parameters: (method)
return_statement: return tf_decorator.make_decorator(
        target=method, decorator_func=_method_wrapper)
docstring: Decorator that disallows multi-worker use of `method`.
docstring_summary: Decorator that disallows multi-worker use of `method`.
docstring_tokens: Decorator that disallows multi - worker use of method .
function: def disable_multi_worker(method):
    """Decorator that disallows multi-worker use of `method`."""
  
    def _method_wrapper(self, *args, **kwargs):
      if self._in_multi_worker_mode():  # pylint: disable=protected-access
        raise ValueError('{} is not supported in multi-worker mode.'.format(
            method.__name__))
      return method(self, *args, **kwargs)
  
    return tf_decorator.make_decorator(
        target=method, decorator_func=_method_wrapper)
function_tokens: def disable_multi_worker ( method ) : def _method_wrapper ( self , * args , * * kwargs ) : if self . _in_multi_worker_mode ( ) : # pylint: disable=protected-access raise ValueError ( '{} is not supported in multi-worker mode.' . format ( method . __name__ ) ) return method ( self , * args , * * kwargs ) return tf_decorator . make_decorator ( target = method , decorator_func = _method_wrapper )