code: def composite_tensor_from_components(type_spec, components):
      if hasattr(type_spec, "from_components"):
          return type_spec.from_components(components)
      elif hasattr(type_spec, "_from_components"):
          return type_spec._from_components(
              components
          )  # pylint: disable=protected-access
      else:
          raise ValueError(
              "Expected a TypeSpec with a from_components method, got: %r"
              % (type_spec,)
          )
  
file_path: hub/tensorflow_hub/tf_utils.py
imports: import os
  import time
  import uuid
  from absl import logging
  import tensorflow
label_desc: Use image node_id 11 for calling a global function with example usage: composite_tensor_from_components(type_spec, components) and returns: type_spec, type_spec