def METHOD_NAME(sample: Dict[str, Any]) -> Dict[str, Any]:
    tensor_sample = {}
    for key in sample:
        if key is DataKeys.METADATA:
            tensor_sample[key] = sample[key]
        else:
            tensor_sample[key] = torch.tensor(sample[key])
    return tensor_sample