def _make_env_vars(self, function):
name = function.name<EOL>variables = None<EOL>if function.environment and isinstance(function.environment, dict) and "<STR_LIT>" in function.environment:<EOL><INDENT>variables = function.environment["<STR_LIT>"]<EOL><DEDENT>else:<EOL><INDENT>LOG.debug("<STR_LIT>", name)<EOL><DEDENT>for env_var_value in self.env_vars_values.values():<EOL><INDENT>if not isinstance(env_var_value, dict):<EOL><INDENT>reason = """<STR_LIT>"""<EOL>LOG.debug(reason)<EOL>raise OverridesNotWellDefinedError(reason)<EOL><DEDENT><DEDENT>if "<STR_LIT>" in self.env_vars_values:<EOL><INDENT>LOG.debug("<STR_LIT>")<EOL>overrides = self.env_vars_values["<STR_LIT>"]<EOL><DEDENT>else:<EOL><INDENT>LOG.debug("<STR_LIT>")<EOL>overrides = self.env_vars_values.get(name, None)<EOL><DEDENT>shell_env = os.environ<EOL>aws_creds = self.get_aws_creds()<EOL>return EnvironmentVariables(function.memory,<EOL>function.timeout,<EOL>function.handler,<EOL>variables=variables,<EOL>shell_env_values=shell_env,<EOL>override_values=overrides,<EOL>aws_creds=aws_creds)<EOL>
Returns the environment variables configuration for this function

        Parameters
        ----------
        function : samcli.commands.local.lib.provider.Function
            Lambda function to generate the configuration for

        Returns
        -------
        samcli.local.lambdafn.env_vars.EnvironmentVariables
            Environment variable configuration for this function

        Raises
        ------
        samcli.commands.local.lib.exceptions.OverridesNotWellDefinedError
            If the environment dict is in the wrong format to process environment vars