def add_port_mapping(port_bindings, internal_port, external):
    if internal_port in port_bindings:
        port_bindings[internal_port].append(external)
    else:
        port_bindings[internal_port] = [external]
dataset/ETHPy150Open docker/docker-py/docker/utils/ports/ports.py/add_port_mapping/original