def METHOD_NAME(
    condition: tuple[ClassicalRegister, int] | tuple[Clbit, int] | expr.Expr
) -> LegacyResources:
    """Get the legacy classical resources (:class:`.Clbit` and :class:`.ClassicalRegister`)
    referenced by a legacy condition or an :class:`~.expr.Expr`."""
    if isinstance(condition, expr.Expr):
        return node_resources(condition)
    target, _ = condition
    if isinstance(target, ClassicalRegister):
        return LegacyResources(tuple(target), (target,))
    return LegacyResources((target,), ())