def METHOD_NAME(tensor):
    if isinstance(tensor, list):
        return tensor
    # Cast to a pytorch supported dtype.
    if tensor.dtype == np.uint16:
        return tensor.astype(np.int32)
    if tensor.dtype == np.uint32:
        return tensor.astype(np.int64)
    if tensor.dtype == np.uint64:
        return tensor.astype(np.int64)
    return None  # if not casted, calling method might want to make a copy.