code: def endpoint_protocol_content(
      ep_proto: "EndpointProtocol",
  ) -> "EndpointProtoJSON":
      ep_proto_payload_dsk_key_map = valmap(
          lambda x: f"{x}.serial", ep_proto.dsk_input_key_map
      )
      ep_proto_result_key_dsk_map = valmap(
          lambda x: f"{x}.serial", ep_proto.dsk_output_key_map
      )
  
      return EndpointProtoJSON(
          name=ep_proto.name,
          route=ep_proto.route,
          payload_key_dsk_task=ep_proto_payload_dsk_key_map,
          result_key_dsk_task=ep_proto_result_key_dsk_map,
      )
  
imports: from collections import defaultdict
  from dataclasses import dataclass
  from operator import attrgetter
  from typing import TYPE_CHECKING, Dict, List, Set, Tuple
  from flash.core.serve.dag.optimization import cull, functions_of, inline_functions
  from flash.core.serve.dag.rewrite import RewriteRule, RuleSet
  from flash.core.serve.dag.task import flatten, get_deps, getcycle, isdag, toposort
  from flash.core.serve.dag.utils import funcname
  from flash.core.utilities.imports import _CYTOOLZ_AVAILABLE, _PYDANTIC_AVAILABLE
label_desc: Use image node_id 5 for calling a global function with example usage: endpoint_protocol_content(ep_proto) and returns: EndpointProtoJSON