def METHOD_NAME(value):
    # we can't rely on importing/accessing torch distributed, it is not always built.
    if not DistributedVariable.is_available():
        return False
    from torch.distributed._tensor.placement_types import Placement
    return isinstance(value, Placement)