You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: fake_function.go
    path of file: ./repos/faas-netes/pkg/client/clientset/versioned/typed/openfaas/v1/fake
    
    the code of the file until where you have to start completion: /*
Copyright 2019-2021 OpenFaaS Authors

Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/

// Code generated by client-gen. DO NOT EDIT.

package fake

import (
	"context"
	json "encoding/jso
    
func (c *FakeFunctions) Update(ctx context.Context, function *v1.Function, opts metav1.UpdateOptions) (result *v1.Function, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateAction(functionsResource, c.ns, function), &v1.Function{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1.Function), err
}