def is_scheduler_like(thing):
    """
    Test if an object can be used as a scheduler.
    :meta private:
    """
    # Pytorch doesn't have a unified inheritance class for these things.
    # So we call it a scheduler if it has a "step" attribute that itself is callable
    return callable(getattr(thing, "step", None))