code: def build_file_descriptor_set(
      pb_message: message.Message,
      fd_set: descriptor_pb2.FileDescriptorSet,
  ) -> descriptor_pb2.FileDescriptorSet:
      """Builds file descriptor set for input pb message."""
      for fd in gather_file_descriptors(pb_message.DESCRIPTOR.file):
          fd.CopyToProto(fd_set.file.add())
      return fd_set
  
file_path: tfx/tfx/utils/proto_utils.py
imports: from typing import Any, Dict, Iterator, TypeVar, Optional
  from google.protobuf import any_pb2
  from google.protobuf import descriptor_pb2
  from google.protobuf import descriptor
  from google.protobuf import descriptor_pool
  from google.protobuf import json_format
  from google.protobuf import message
  from google.protobuf import message_factory
label_desc: Use image node_id 6 for calling a global function with example usage: build_file_descriptor_set(pb_message, fd_set) and returns: fd_set