code: def allow_empty_variables(module_or_cls: T) -> T:
      """Allows ``{trainable_,}variables`` to return empty results.
  
      >>> mod = snt.Module()
      >>> mod.variables
      Traceback (most recent call last):
        ...
      ValueError: ... pass an example input to the module...
      >>> mod = snt.allow_empty_variables(mod)
      >>> mod.variables
      ()
  
      Args:
        module_or_cls: A :class:`Module` instance or subclass to decorate.
  
      Returns:
        The input module or class.
      """
      setattr(module_or_cls, ALLOW_EMPTY_RESULT, True)
      return module_or_cls
  
imports: import abc
  import functools
  import inspect
  import os
  import pprint
  import sys
  from typing import Any, Callable, Dict, Optional, Sequence, Tuple, Type, TypeVar
  from sonnet.src import once
  from sonnet.src import types
  from sonnet.src import utils
  import tensorflow
label_desc: Use image node_id 9 for calling a global function with example usage: allow_empty_variables(module_or_cls) and returns: module_or_cls