code: func (c *dynamicResourceClient) Patch(name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*unstructured.Unstructured, error) {
  	var uncastRet runtime.Object
  	var err error
  	switch {
  	case len(c.namespace) == 0 && len(subresources) == 0:
  		uncastRet, err = c.client.Fake.
  			Invokes(testing.NewRootPatchAction(c.resource, name, pt, data), &metav1.Status{Status: "dynamic patch fail"})
  
  	case len(c.namespace) == 0 && len(subresources) > 0:
  		uncastRet, err = c.client.Fake.
  			Invokes(testing.NewRootPatchSubresourceAction(c.resource, name, pt, data, subresources...), &metav1.Status{Status: "dynamic patch fail"})
  
  	case len(c.namespace) > 0 && len(subresources) == 0:
  		uncastRet, err = c.client.Fake.
  			Invokes(testing.NewPatchAction(c.resource, c.namespace, name, pt, data), &metav1.Status{Status: "dynamic patch fail"})
  
  	case len(c.namespace) > 0 && len(subresources) > 0:
  		uncastRet, err = c.client.Fake.
  			Invokes(testing.NewPatchSubresourceAction(c.resource, c.namespace, name, pt, data, subresources...), &metav1.Status{Status: "dynamic patch fail"})
  
  	}
  
  	if err != nil {
  		return nil, err
  	}
  	if uncastRet == nil {
  		return nil, err
  	}
  
  	ret := &unstructured.Unstructured{}
  	if err := c.client.scheme.Convert(uncastRet, ret, nil); err != nil {
  		return nil, err
  	}
  	return ret, err
  }
docs: // TODO: opts are currently ignored.