code: def get_port_bindings(container_config, client_config):
      
      port_bindings = {}
      if_ipv4 = client_config.interfaces
      if_ipv6 = client_config.interfaces_ipv6
      for exposed_port, ex_port_bindings in itertools.groupby(
              sorted(container_config.exposes, key=_get_ex_port), _get_ex_port):
          bind_list = list(_get_port_bindings(ex_port_bindings, if_ipv4, if_ipv6))
          if bind_list:
              port_bindings[exposed_port] = bind_list
      return port_bindings
docs: Generates the input dictionary contents for the ``port_bindings`` argument.
  
      :param container_config: Container configuration.
      :type container_config: dockermap.map.config.container.ContainerConfiguration
      :param client_config: Client configuration.
      :type client_config: dockermap.map.config.client.ClientConfiguration
      :return: Dictionary of ports with mapped port, and if applicable, with bind address
      :rtype: dict[unicode | str, list[unicode | str | int | tuple]]