code: def is_nn_module(x):
      torch = sys.modules.get("torch")
      if torch is not None:
          return isinstance(x, torch.nn.Module)
      return False
  
imports: import functools
  import inspect
  import pprint
  import re
  import sys
  import numpy
label_desc: Use image node_id 16 for calling a global function with example usage: is_nn_module(x) and returns: False, isinstance