code: def iter_over_pairs(pairs):
      """
      Return an iterator over pairs present in the 'pairs' input.
  
      Parameters
      ----------
      pairs : dictionary or iterable
          The pairs to iterate upon. These may be stored either as (key, value)
          items in a dictionary, or directly as pairs in any kind of iterable
          structure.
  
      Returns
      -------
      iterable
          An iterable yielding pairs.
  
      """
      if isinstance(pairs, dict):
          return iteritems(pairs)
      else:
          return pairs
  
file_path: Theano/theano/compile/pfunc.py
imports: from __future__ import absolute_import, print_function, division
  import warnings
  from theano import config
  from six import iteritems
  from theano.compile import orig_function, In, Out
  from theano.compile import UnusedInputError
  from theano.compile.sharedvalue import SharedVariable, shared
  from theano.compile.profiling import ProfileStats
  from theano.gof import Variable, Constant
  import logging
label_desc: Use image node_id 4 for calling a global function with example usage: iter_over_pairs(pairs) and returns: iteritems, pairs