code: def ufunctor_apply_type(
      t: Type, *, binds: ArgName, scalar_t: BaseCppType
  ) -> NamedCType:
      if t == BaseType(BaseTy.Tensor):
          return NamedCType(binds, BaseCType(scalar_t))
      else:
          raise AssertionError(f"unrecognized type {repr(t)}")
  
file_path: pytorch/torchgen/api/ufunc.py
imports: from dataclasses import dataclass
  from typing import List, Optional
  import torchgen.api.types
  from torchgen.api import cpp, structured
  from torchgen.api.types import ArgName, BaseCppType, BaseCType, Binding, ConstRefCType, CType, NamedCType, scalarT
  from torchgen.model import Argument, BaseTy, BaseType, DispatchKey, FunctionSchema, NativeFunctionsGroup, Type
label_desc: Use image node_id 6 for calling a global function with example usage: ufunctor_apply_type(t) and returns: NamedCType