code: def update_resource_assignments(self, id_or_uri, resource_assignments, timeout=-1):
          
          uri = self._client.build_uri(id_or_uri) + "/resource-assignments"
  
          headers = {'Content-Type': 'application/json'}
  
          return self._client.patch_request(uri, resource_assignments, timeout=timeout, custom_headers=headers)
docs: Modifies scope membership by adding or removing resource assignments.
  
          Args:
              id_or_uri: Can be either the resource ID or the resource URI.
              resource_assignments (dict):
                  A dict object with a list of resource URIs to be added and a list of resource URIs to be removed.
              timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation
                  in OneView; it just stops waiting for its completion.
  
          Returns:
              dict: Updated resource.