def _build_function(self, function_name, codeuri, runtime):
<EOL>code_dir = str(pathlib.Path(self._base_dir, codeuri).resolve())<EOL>config = get_workflow_config(runtime, code_dir, self._base_dir)<EOL>artifacts_dir = str(pathlib.Path(self._build_dir, function_name))<EOL>with osutils.mkdir_temp() as scratch_dir:<EOL><INDENT>manifest_path = self._manifest_path_override or os.path.join(code_dir, config.manifest_name)<EOL>build_method = self._build_function_in_process<EOL>if self._container_manager:<EOL><INDENT>build_method = self._build_function_on_container<EOL><DEDENT>return build_method(config,<EOL>code_dir,<EOL>artifacts_dir,<EOL>scratch_dir,<EOL>manifest_path,<EOL>runtime)<EOL><DEDENT>
Given the function information, this method will build the Lambda function. Depending on the configuration
it will either build the function in process or by spinning up a Docker container.

Parameters
----------
function_name : str
    Name or LogicalId of the function

codeuri : str
    Path to where the code lives

runtime : str
    AWS Lambda function runtime

Returns
-------
str
    Path to the location where built artifacts are available