code: def get_individual_channels(
      input_channel: channel.BaseChannel,
  ) -> List[channel.Channel]:
      """Converts BaseChannel into a list of Channels."""
      if isinstance(input_channel, channel.Channel):
          return [input_channel]
      elif isinstance(input_channel, channel.UnionChannel):
          return [
              chan
              for chan in cast(
                  channel.UnionChannel, input_channel
              ).channels
              if isinstance(chan, channel.Channel)
          ]
      else:
          raise NotImplementedError(
              f"Unsupported Channel type: {type(input_channel)}"
          )
  
imports: import typing
  from typing import Callable, Dict, Iterable, Iterator, List, Optional, Sequence, Set, Type, cast
  from tfx.dsl.placeholder import placeholder
  from tfx.proto.orchestration import placeholder_pb2
  from tfx.types import artifact
  from tfx.types import channel
label_desc: Use image node_id 3 for calling a global function with example usage: get_individual_channels(input_channel) and returns: list, unknown