code: def _sanitize_level(name_or_level: Optional[Union[str, int]]) -> int:
      if isinstance(name_or_level, str):
          try:
              return _name_to_level[name_or_level.upper()]
          except KeyError:
              raise ValueError(
                  f"Unknown level name: {name_or_level}, supported levels: {_name_to_level.keys()}"
              )
  
      if isinstance(name_or_level, int):
          return name_or_level
  
      if name_or_level is None:
          return INFO
  
      raise ValueError(f"Unknown status level {name_or_level}")
  
imports: import itertools
  import platform
  import sys
  from abc import abstractmethod
  from typing import Callable, List, Optional, Tuple, Union
  import click
  import wandb
  from .None import ipython, sparkline
label_desc: Use image node_id 5 for calling the _Printer obj's underlying member method code with example usage: obj._sanitize_level(name_or_level) and returns: name_or_level, INFO, _name_to_level