chain()
Enable chaining by wrapping the object in a chainable class.
Implementation
Args: obj: The object to wrap Returns: A chainable wrapper
Example
chain({"a": 1, "b": 2})["a"]
Expected output: 1
Source Code
def chain(obj: Any) -> Any:
# Import locally to avoid circular imports
from .core import UniCoreFWWrapper
return UniCoreFWWrapper(obj)