class_docstr: Holder class for each grid type of component and connections from those to the types of other components.
  
  Parameters
  ----------
  name
      Name of the parameter. It's same as the dictionary key from `expose`
  datatype
      Grid type object
  component_uid
      Which component this type is associated with
  position
      Position in the while exposing it i.e `inputs` or `outputs`
class_docstr_tok: ["Holder","class","for","each","grid","type","of","component","and","connections","from","those","to","the","types","of","other","components",".","Parameters","--","--","--","--","--","name","Name","of","the","parameter",".","It","'s","same","as","the","dictionary","key","from","`","expose","`","datatype","Grid","type","object","component_uid","Which","component","this","type","is","associated","with","position","Position","in","the","while","exposing","it","i.e","`","inputs","`","or","`","outputs","`"]
docstr: Verify that components can be composed.
  
  Parameters
  ----------
  other
      object passed into the bitshift operator. We verify if is a
      ``Parameter`` class and that is not the type of the same component
  dunder_meth_called: str
      one of ['__lshift__', '__rshift__']. we need to know the
      directionality of the bitshift method called when we verify
      that the directionality of the dag is always outputs -> inputs.
  
  Raises
  ------
  TypeError, RuntimeError
      if the verification fails, we throw an exception to stop the
      connection from being created.
docstr_tok: ["Verify","that","components","can","be","composed",".","Parameters","--","--","--","--","--","other","object","passed","into","the","bitshift","operator",".","We","verify","if","is","a","``","Parameter","``","class","and","that","is","not","the","type","of","the","same","component","dunder_meth_called",":","str","one","of","[","'__lshift__","'",",","'__rshift__","'","]",".","we","need","to","know","the","directionality","of","the","bitshift","method","called","when","we","verify","that","the","directionality","of","the","dag","is","always","outputs","-",">","inputs",".","Raises","--","--","--","TypeError",",","RuntimeError","if","the","verification","fails",",","we","throw","an","exception","to","stop","the","connection","from","being","created","."]
code: def __terminate_invalid_connection_request(
      self, other: "Parameter", dunder_meth_called: str
  ) -> None:
      """Verify that components can be composed.
  
      Parameters
      ----------
      other
          object passed into the bitshift operator. We verify if is a
          ``Parameter`` class and that is not the type of the same component
      dunder_meth_called: str
          one of ['__lshift__', '__rshift__']. we need to know the
          directionality of the bitshift method called when we verify
          that the directionality of the dag is always outputs -> inputs.
  
      Raises
      ------
      TypeError, RuntimeError
          if the verification fails, we throw an exception to stop the
          connection from being created.
  
      """
      # assert this is actually a class object we can compare against.
      if not isinstance(other, self.__class__) or (
          other.__class__ != self.__class__
      ):
          raise TypeError(
              f"Can only Compose another `Parameter` class, not {type(other)}"
          )
  
      # assert not same instance
      if id(other) == id(self):
          raise RuntimeError(
              "Cannot compose a parameters of same components"
          )
  
      # assert bitshift directionality is acceptable for source/target map
      source = other if dunder_meth_called == "__lshift__" else self
      target = self if dunder_meth_called == "__lshift__" else other
      if source.position != "outputs":
          raise TypeError(
              f"A data source component can only provide a target with data listed "
              f"as ``output``. source component: `{source.component_uid}` "
              f"key: `{source.name}`"
          )
      if target.position != "inputs":
          raise TypeError(
              f"A data target component can only accept data into keys listed as "
              f"`inputs`. components: source=`{str(source)}` target={str(target)}"
          )
      if source.component_uid == target.component_uid:
          raise RuntimeError(
              f"Cannot create cycle by creating connection between outputs and "
              f"inputs of a single component. source component: `{source.component_uid}`"
          )
  
imports: import dataclasses
  from dataclasses import dataclass, field, make_dataclass
  from pathlib import Path
  from typing import Dict, Iterator, List, NamedTuple, Optional, Tuple, Type, TypeVar, Union
  import pytorch_lightning
  import torch
  from flash.core.serve.types.base import BaseType
  from flash.core.serve.utils import download_file
  from flash.core.utilities.imports import _PYDANTIC_AVAILABLE, requires
label_desc: Use image node_id 2 for calling the Parameter obj's underlying member method code with example usage: obj.__terminate_invalid_connection_request(other, dunder_meth_called) without return types