parameters: (
      server_host: Optional[str],
      server_port: int = DEFAULT_ADMIN_API_PORT,
      server_path: Optional[str] = None,
  )
return_statement: return SocketAddress(
          address_family=address_family,
          address=server_path
          if address_family == SocketAddressFamily.UNIX
          else server_host,
          port=server_port,
      )
docstring: Creates a SocketAddress object given a host/path/port
docstring_summary: Creates a SocketAddress object given a host/path/port
docstring_tokens: Creates a SocketAddress object given a host / path / port
function: def create_socket_address(
      server_host: Optional[str],
      server_port: int = DEFAULT_ADMIN_API_PORT,
      server_path: Optional[str] = None,
  ) -> SocketAddress:
      """
      Creates a SocketAddress object given a host/path/port
      """
      address_family = SocketAddressFamily.INET
      if server_path is not None:
          address_family = SocketAddressFamily.UNIX
      return SocketAddress(
          address_family=address_family,
          address=server_path
          if address_family == SocketAddressFamily.UNIX
          else server_host,
          port=server_port,
      )
function_tokens: def create_socket_address ( server_host : Optional [ str ] , server_port : int = DEFAULT_ADMIN_API_PORT , server_path : Optional [ str ] = None , ) -> SocketAddress : address_family = SocketAddressFamily . INET if server_path is not None : address_family = SocketAddressFamily . UNIX return SocketAddress ( address_family = address_family , address = server_path if address_family == SocketAddressFamily . UNIX else server_host , port = server_port , )