code: def _IsNets(nets_or_steps):
      if isinstance(nets_or_steps, list):
          return all(isinstance(n, core.Net) for n in nets_or_steps)
      else:
          return isinstance(nets_or_steps, core.Net)
  
imports: from caffe2.python import core
label_desc: Use image node_id 3 for calling a global function with example usage: _IsNets(nets_or_steps) and returns: all, isinstance