def __call__()

in flowtorch/lazy.py [0:0]


    def __call__(self, *args: Any, **kwargs: Any) -> "Lazy":
        """
        Apply additional bindings
        """
        new_bindings = dict(self.bound_sig.bind_partial(*args, **kwargs).arguments)
        new_bindings.update(self.bindings)

        # Update args and kwargs
        new_args = []
        new_kwargs = {}
        for n, p in self.sig.parameters.items():
            if n in new_bindings:
                if p.kind == inspect.Parameter.POSITIONAL_ONLY:
                    new_args.append(new_bindings[n])

                else:
                    new_kwargs[n] = new_bindings[n]

        # Attempt object creation
        return Lazy(self.cls, *new_args, **new_kwargs)