code: def isWrappedScalarType(typ: Type) -> bool:
      """
      Given a type, determine if it is a c10::scalar which we will wrap in a lazy Value.
      Since we literally change the type from scalarT to valueT, information is lost.
      This function helps build a list of wrapped scalars to save that information
      """
      if isinstance(typ, BaseType):
          # I am regretting my naming conventions, but now we are wrapping at::scalar in
          # lazy value, while preserving other 'scalar' types as scalars in the IR
          return typ.name == BaseTy.Scalar
      elif isinstance(typ, (OptionalType, ListType)):
          return isWrappedScalarType(typ.elem)
      return False
  
imports: from typing import Any, Dict, List, Optional, Tuple, Union
  from torchgen.api.types import BaseCppType, BaseCType, boolT, CType, deviceT, doubleT, generatorT, layoutT, ListCType, longT, memoryFormatT, NamedCType, OptionalCType, scalarT, scalarTypeT, stringT, SymIntT, VectorCType
  from torchgen.model import Argument, BaseTy, BaseType, FunctionSchema, ListType, OperatorName, OptionalType, Return, TensorOptionsArguments, Type
label_desc: Use image node_id 6 for calling a global function with example usage: isWrappedScalarType(typ) and returns: False, unknown, isWrappedScalarType