def METHOD_NAME(value):
  type_map = {
    "torch.int": "int",
    "torch.long": "int",
    "torch.short": "int",
    "torch.float": "float",
    "torch.half": "float",
    "torch.double": "float",
    "torch.bool": "bool",
    int: "int",
    float: "float",
    bool: "bool",
    str: "str",
    "int64": "int",
    "int32": "int",
    "float32": "float",
    "float64": "float",
    "float16": "float"
  }
  if isinstance(value, Tensor):
    return type_map.get(value.dtype, value.dtype)
  else:
    return type_map[type(value)]