<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_function(self, function_name, # type: str zip_contents, # type: str environment_variables=None, # type: StrMap runtime=None, # type: OptStr tags=None, # type: StrMap timeout=None, # type: OptInt memory_size=None, # type: OptInt role_arn=None, # type: OptStr subnet_ids=None, # type: OptStrList security_group_ids=None, # type: OptStrList layers=None, # type: OptStrList ):
 """Update a Lambda function's code and configuration. This method only updates the values provided to it. If a parameter is not provided, no changes will be made for that that parameter on the targeted lambda function. """

        return_value = self._update_function_code(function_name=function_name,
                                                  zip_contents=zip_contents)
        self._update_function_config(
            environment_variables=environment_variables,
            runtime=runtime,
            timeout=timeout,
            memory_size=memory_size,
            role_arn=role_arn,
            subnet_ids=subnet_ids,
            security_group_ids=security_group_ids,
            function_name=function_name,
            layers=layers
        )
        if tags is not None:
            self._update_function_tags(return_value['FunctionArn'], tags)
        return return_value