parameters: (ctx, config, initial_port)
return_statement: return role_endpoints
docstring: Assign port numbers starting from @initial_port
docstring_summary: Assign port numbers starting from
docstring_tokens: Assign port numbers starting from
function: def assign_ports(ctx, config, initial_port):
      """
      Assign port numbers starting from @initial_port
      """
      port = initial_port
      role_endpoints = {}
      for remote, roles_for_host in ctx.cluster.remotes.items():
          for role in roles_for_host:
              if role in config:
                  role_endpoints[role] = (remote.name.split('@')[1], port)
                  port += 1
  
      return role_endpoints
function_tokens: def assign_ports ( ctx , config , initial_port ) : port = initial_port role_endpoints = { } for remote , roles_for_host in ctx . cluster . remotes . items ( ) : for role in roles_for_host : if role in config : role_endpoints [ role ] = ( remote . name . split ( '@' ) [ 1 ] , port ) port += 1 return role_endpoints