code: def inline_ofg_expansion(node):
      """
      This optimization expands internal graph of OpFromGraph.
      Only performed if node.op.is_inline == True
      Doing so can improve optimization at the cost of compilation speed.
      """
      op = node.op
      if not isinstance(op, OpFromGraph):
          return False
      if not op.is_inline:
          return False
      return theano.clone(
          op.local_outputs,
          {u: v for u, v in izip(node.op.local_inputs, node.inputs)},
      )
  
imports: from __future__ import absolute_import, division, print_function
  from functools import reduce, partial
  from collections import OrderedDict
  import theano
  from theano import gof
  from theano.compat import izip
  from theano.compile.function_module import orig_function
  from theano.compile import SharedVariable, rebuild_collect_shared, optdb
  from theano.gof import Variable, ops_with_inner_function
  from theano.gof.graph import io_connection_pattern
  from theano.gof.null_type import NullType
  from theano.gradient import DisconnectedType
label_desc: Use image node_id 1 for calling a global function with example usage: inline_ofg_expansion(node) and returns: theano, False, False