def METHOD_NAME(dtype) -> torch.dtype:
    if dtype == 'f16':
        return torch.float16
    elif dtype == 'f32':
        return torch.float32
    else:
        raise TypeError("%s is not supported by torch" % dtype)