def validate_environment(cls, values: Dict) -> Dict:
        """Validate that api key and python package exists in environment."""
        func = values.get("func")
        if func and not values.get("name"):
            values["name"] = values["func"].__name__

        # check if all args from arg_description exist in func args
        if values.get("arg_description") and func:
            inspection = inspect.getfullargspec(func)
            override_args = set(values["arg_description"].keys())
            args = set(inspection.args)
            override_without_args = override_args - args
            if len(override_without_args) > 0:
                raise ValueError(
                    f"Provide arg description for not existed args: {override_without_args}"
                )

        return values
Validate that api key and python package exists in environment.
autochain/tools/base.py