def METHOD_NAME(tdtype):
    """Translates between torch.dtypes and bittensor.dtypes.
    Args:
        tdtype (torch.dtype): torch.dtype to translate.
    Returns:
        dtype: (bittensor.dtype): translated bittensor.dtype.
    """
    if tdtype == torch.float32:
        dtype = bittensor.proto.DataType.FLOAT32
    elif tdtype == torch.float64:
        dtype = bittensor.proto.DataType.FLOAT64
    elif tdtype == torch.int32:
        dtype = bittensor.proto.DataType.INT32
    elif tdtype == torch.int64:
        dtype = bittensor.proto.DataType.INT64
    elif tdtype == torch.float16:
        dtype = bittensor.proto.DataType.FLOAT16
    elif tdtype == torch.bool:
        dtype = bittensor.proto.DataType.BOOL
    else:
        dtype = bittensor.proto.DataType.UNKNOWN
    return dtype