code: def get_field(
      proto: message.Message, fields: FieldTypes
  ) -> tuple[Any, Optional[descriptor.FieldDescriptor]]:
      """Returns the field and field descriptor from the proto.
  
      Args:
        proto: Parent proto of any message type.
        fields: List of string/int/map key fields, e.g. ["nodes", "attr", "value"]
          can represent `proto.nodes.attr["value"]`.
  
      Returns:
        Tuple of (
          Field in the proto or `None` if none are found,
          Field descriptor
        )
      """
      field_proto = proto
      field_desc = None
      for field_proto, field_desc, _, _ in _walk_fields(proto, fields):
          pass
      return field_proto, field_desc
  
file_path: tensorflow-upstream/tensorflow/tools/proto_splitter/util.py
imports: from collections.abc import Sequence
  from typing import Any, Optional, Union
  from google.protobuf import descriptor
  from google.protobuf import message
  from tensorflow.tools.proto_splitter import chunk_pb2
label_desc: Use image node_id 2 for calling a global function with example usage: get_field(proto, fields) and returns: field_proto,  field_desc