class_docstr: This is the main class which would represent neural type concept.
  It is used to represent *the types* of inputs and outputs.
  
  Args:
      axes (Optional[Tuple]): a tuple of AxisTypes objects representing the semantics of what varying each axis means
          You can use a short, string-based form here. For example: ('B', 'C', 'H', 'W') would correspond to an NCHW
          format frequently used in computer vision. ('B', 'T', 'D') is frequently used for signal processing and
          means [batch, time, dimension/channel].
      elements_type (ElementType): an instance of ElementType class representing the semantics of what is stored
          inside the tensor. For example: logits (LogitsType), log probabilities (LogprobType), etc.
      optional (bool): By default, this is false. If set to True, it would means that input to the port of this
          type can be optional.
class_docstr_tok: ["This","is","the","main","class","which","would","represent","neural","type","concept",".","It","is","used","to","represent","*","the","types","*","of","inputs","and","outputs",".","Args",":","axes","(","Optional","[","Tuple","]",")",":","a","tuple","of","AxisTypes","objects","representing","the","semantics","of","what","varying","each","axis","means","You","can","use","a","short",",","string-based","form","here",".","For","example",":","(","'","B","'",",","'","C","'",",","'","H","'",",","'","W","'",")","would","correspond","to","an","NCHW","format","frequently","used","in","computer","vision",".","(","'","B","'",",","'T","'",",","'D","'",")","is","frequently","used","for","signal","processing","and","means","[","batch",",","time",",","dimension\/channel","]",".","elements_type","(","ElementType",")",":","an","instance","of","ElementType","class","representing","the","semantics","of","what","is","stored","inside","the","tensor",".","For","example",":","logits","(","LogitsType",")",",","log","probabilities","(","LogprobType",")",",","etc",".","optional","(","bool",")",":","By","default",",","this","is","false",".","If","set","to","True",",","it","would","means","that","input","to","the","port","of","this","type","can","be","optional","."]
code: def __check_sanity(axes):
      # check that list come before any tensor dimension
      are_strings = True
      for axis in axes:
          if not isinstance(axis, str):
              are_strings = False
          if isinstance(axis, str) and not are_strings:
              raise ValueError(
                  "Either use full class names or all strings"
              )
      if are_strings:
          return
      checks_passed = True
      saw_tensor_dim = False
      for axis in axes:
          if not axis.is_list:
              saw_tensor_dim = True
          else:  # current axis is a list
              if saw_tensor_dim:  # which is preceded by tensor dim
                  checks_passed = False
      if not checks_passed:
          raise ValueError(
              "You have list dimension after Tensor dimension. All list dimensions must preceed Tensor dimensions"
          )
  
imports: from typing import Any, Optional
  import torch
  from nemo.core.neural_types.axes import AxisKind, AxisType
  from nemo.core.neural_types.comparison import NeuralTypeComparisonResult
  from nemo.core.neural_types.elements import ElementType, VoidType
label_desc: Use image node_id 6 for calling the NeuralType obj's underlying member method code with example usage: obj.__check_sanity(axes) without return types