def METHOD_NAME(*args, **kwargs):
  with self._mutex:
    # Dereference args corresponding to params, leaving others unchanged.
    args_with_dereferenced_params = [
        self._dereference_params(arg) for arg in args
    ]
    kwargs_with_dereferenced_params = {
        key: self._dereference_params(value)
        for key, value in kwargs.items()
    }
    self._call_cnt += 1
    # Maybe update params, depending on client configuration.
    if self._variable_client is not None:
      self._variable_client.update()
  return handler(*args_with_dereferenced_params,
                 **kwargs_with_dereferenced_params)