raise TypeError(
                "Expected a callable type for `func`."
                f"Instead got an unsupported type: {type(func)}"
            )
    def __eq__(self, other: Any) -> bool:
        if isinstance(other, RunnableLambda):
            return self.func == other.func
        else:
            return False
[docs]    def invoke(self, input: Input, config: Optional[RunnableConfig] = None) -> Output:
        return self._call_with_config(self.func, input, config)
[docs]class RunnablePassthrough(Serializable, Runnable[Input, Input]):
    @property
    def lc_serializable(self) -> bool:
        return True
[docs]    def invoke(self, input: Input, config: Optional[RunnableConfig] = None) -> Input:
        return self._call_with_config(lambda x: x, input, config)
[docs]class RunnableBinding(Serializable, Runnable[Input, Output]):
    bound: Runnable[Input, Output]
    kwargs: Mapping[str, Any]
    class Config:
        arbitrary_types_allowed = True
    @property
    def lc_serializable(self) -> bool:
        return True
[docs]    def bind(self, **kwargs: Any) -> Runnable[Input, Output]:
        return self.__class__(bound=self.bound, kwargs={**self.kwargs, **kwargs})
[docs]    def invoke(self, input: Input, config: Optional[RunnableConfig] = None) -> Output:
        return self.bound.invoke(input, config, **self.kwargs)
[docs]    async def ainvoke(
        self, input: Input, config: Optional[RunnableConfig] = None
    ) -> Output:
        return await self.bound.ainvoke(input, config, **self.kwargs)