class_docstr: A decorator which performs input-output neural type checks, and attaches
  neural types to the output of the function that it wraps.
  
  Requires that the class inherit from :class:`~nemo.core.Typing` in order to perform
  type checking, and will raise an error if that is not the case.
  
  # Usage (Class level type support)
  
  .. code-block:: python
  
      @typecheck()
      def fn(self, arg1, arg2, ...):
          ...
  
  # Usage (Function level type support)
  
  .. code-block:: python
  
      @typecheck(input_types=..., output_types=...)
      def fn(self, arg1, arg2, ...):
          ...
  
  Points to be noted:
  
  1) The brackets () in `@typecheck()` are necessary.
  
      You will encounter a TypeError: __init__() takes 1 positional argument but X
      were given without those brackets.
  
  2) The function can take any number of positional arguments during definition.
  
      When you call this function, all arguments must be passed using kwargs only.
class_docstr_tok: ["A","decorator","which","performs","input-output","neural","type","checks",",","and","attaches","neural","types","to","the","output","of","the","function","that","it","wraps",".","Requires","that","the","class","inherit","from",":","class",":","`","~nemo.core.Typing","`","in","order","to","perform","type","checking",",","and","will","raise","an","error","if","that","is","not","the","case",".","#","Usage","(","Class","level","type","support",")","..","code-block",":",":","python","@","typecheck","(",")","def","fn","(","self",",","arg1",",","arg2",",","...",")",":","...","#","Usage","(","Function","level","type","support",")","..","code-block",":",":","python","@","typecheck","(","input_types=","...",",","output_types=","...",")","def","fn","(","self",",","arg1",",","arg2",",","...",")",":","...","Points","to","be","noted",":","1",")","The","brackets","(",")","in","`","@","typecheck","(",")","`","are","necessary",".","You","will","encounter","a","TypeError",":","__init__","(",")","takes","1","positional","argument","but","X","were","given","without","those","brackets",".","2",")","The","function","can","take","any","number","of","positional","arguments","during","definition",".","When","you","call","this","function",",","all","arguments","must","be","passed","using","kwargs","only","."]
code: def __init__(
      self,
      input_types: Union[
          TypeState, Dict[str, NeuralType]
      ] = TypeState.UNINITIALIZED,
      output_types: Union[
          TypeState, Dict[str, NeuralType]
      ] = TypeState.UNINITIALIZED,
      ignore_collections: bool = False,
  ):
      self.input_types = input_types
      self.output_types = output_types
  
      if input_types == self.TypeState.UNINITIALIZED:
          self.input_override = False
      else:
          self.input_override = True
  
      if output_types == self.TypeState.UNINITIALIZED:
          self.output_override = False
      else:
          self.output_override = True
  
      self.ignore_collections = ignore_collections
  
imports: import hashlib
  import inspect
  import traceback
  from abc import ABC, abstractmethod
  from contextlib import contextmanager
  from dataclasses import dataclass, field
  from enum import Enum
  from functools import total_ordering
  from pathlib import Path
  from typing import Dict, Iterable, List, Optional, Tuple, Union
  import hydra
  import torch
  import wrapt
  from huggingface_hub import HfApi, HfFolder, ModelFilter, hf_hub_download
  from huggingface_hub.hf_api import ModelInfo
  from omegaconf import DictConfig, OmegaConf
  import nemo
  from nemo.core.connectors.save_restore_connector import SaveRestoreConnector
  from nemo.core.neural_types import NeuralType, NeuralTypeComparisonResult
  from nemo.utils import logging
  from nemo.utils.cloud import maybe_download_from_cloud
  from nemo.utils.data_utils import resolve_cache_dir
  from nemo.utils.model_utils import import_class_by_path, maybe_update_config_version
label_desc: Use image node_id 1 to create a new typecheck object  with example: obj = typecheck(input_types, output_types, ignore_collections)