code: def test_free_inner_cell_outer(self):
      code = """
              g = 2
              def f():
                  return g
              y = [g for x in [1]]
          """
      outputs = {"y": [2]}
      self._check_in_scopes(
          code, outputs, scopes=["module", "function"]
      )
      self._check_in_scopes(code, scopes=["class"], raises=NameError)
  
imports: import doctest
  import textwrap
  import types
  import unittest
label_desc: Use image node_id 9 for calling the ListComprehensionTest obj's underlying member method code with example usage: obj.test_free_inner_cell_outer() without return types