class_docstr: A channel parameter that forms part of a ComponentSpec.
  
  This type of parameter should be specified in the INPUTS and OUTPUTS dict
  fields of a ComponentSpec:
  
  class MyCustomComponentSpec(ComponentSpec):
    # ...
    INPUTS = {
        'input_examples': ChannelParameter(type=standard_artifacts.Examples),
    }
    OUTPUTS = {
        'output_examples': ChannelParameter(type=standard_artifacts.Examples),
    }
    # ...
code: def type_check(
      self, arg_name: str, value: channel.BaseChannel
  ):  # pylint: disable=missing-function-docstring
      if not isinstance(value, channel.BaseChannel):
          raise TypeError(
              f"Argument {arg_name} should be a Channel of type {self.type} (got "
              f"{value})."
          )
      if not (
          value.type is self.type
          or value.type.__name__ == self.type.__name__
          or value.type in getattr(self.type, COMPATIBLE_TYPES_KEY, ())
      ):
          raise TypeError(
              f"Argument {arg_name} should be a Channel of type {self.type} (got "
              f"{value.type})."
          )
      expect_json_typehint = getattr(
          self, "_JSON_COMPAT_TYPEHINT", None
      )
      if expect_json_typehint is not None:
          in_json_typehint = getattr(
              value, "_JSON_COMPAT_TYPEHINT", None
          )
          if not check_strict_json_compat(
              in_type=in_json_typehint, expect_type=expect_json_typehint
          ):
              raise TypeError(
                  "Argument %s should be a Channel of type %r (got %s)."
                  % (arg_name, expect_json_typehint, in_json_typehint)
              )
  
imports: import copy
  import inspect
  import itertools
  from typing import Any, Dict, List, Mapping, Optional, Type, cast
  from tfx.dsl.component.experimental.json_compat import check_strict_json_compat
  from tfx.dsl.placeholder import placeholder
  from tfx.types import artifact
  from tfx.types import channel
  from tfx.types.system_executions import SystemExecution
  from tfx.utils import json_utils
  from tfx.utils import proto_utils
  from google.protobuf import message
label_desc: Use image node_id 4 for calling the ChannelParameter obj's underlying member method code with example usage: obj.type_check(arg_name, value) without return types