code: def addresses_from_user_args(  # type: ignore[no-untyped-def]
      host=None,
      port=None,
      interface=None,
      protocol=None,
      peer=None,
      security=None,
      default_port=0,
  ) -> list:
      """Get a list of addresses if the inputs are lists
  
      This is like ``address_from_user_args`` except that it also accepts lists
      for some of the arguments.  If these arguments are lists then it will map
      over them accordingly.
  
      Examples
      --------
      >>> addresses_from_user_args(host="127.0.0.1", protocol=["inproc", "tcp"])
      ["inproc://127.0.0.1:", "tcp://127.0.0.1:"]
      """
  
      def listify(obj):
          if isinstance(obj, (tuple, list)):
              return obj
          else:
              return itertools.repeat(obj)
  
      if any(
          isinstance(x, (tuple, list))
          for x in (host, port, interface, protocol)
      ):
          return [
              address_from_user_args(
                  host=h,
                  port=p,
                  interface=i,
                  protocol=pr,
                  peer=peer,
                  security=security,
                  default_port=default_port,
              )
              for h, p, i, pr in zip(
                  *map(listify, (host, port, interface, protocol))
              )
          ]
      else:
          return [
              address_from_user_args(
                  host,
                  port,
                  interface,
                  protocol,
                  peer,
                  security,
                  default_port,
              )
          ]
  
file_path: distributed/distributed/comm/addressing.py
imports: from __future__ import annotations
  import itertools
  import dask
  from distributed.comm import registry
  from distributed.utils import get_ip_interface
label_desc: Use image node_id 11 for calling a global function with example usage: addresses_from_user_args(host, port, interface, protocol, peer, security, default_port) and returns: unknown, list, obj, itertools