code: def test_from_import_class_object(self):
      graph = pda.DepGraph()
      graph.ids["ray"] = 0
  
      with tempfile.TemporaryDirectory() as tmpdir:
          src_path = "multi_line_comment_3.py"
          self.create_tmp_file(
              os.path.join(tmpdir, src_path),
              """
  from ray.rllib.env import MockEnv
  a = 1
  b = 2
  """,
          )
          # Touch ray/rllib/env.py in tmpdir,
          # MockEnv is a class on env module.
          module_dir = os.path.join(tmpdir, "python", "ray", "rllib")
          os.makedirs(module_dir, exist_ok=True)
          f = open(os.path.join(module_dir, "env.py"), "w")
          f.write("print('hello world!')")
          f.close
  
          pda._process_file(graph, src_path, "ray", _base_dir=tmpdir)
  
      self.assertEqual(len(graph.ids), 2)
      # Should depend on env.py instead.
      self.assertEqual(graph.ids["ray.rllib.env"], 1)
      # Only 1 edge from ray to ray.rllib.env.mock_env
      # ray.tune.tune is ignored.
      self.assertEqual(graph.edges[0], {1: True})
  
file_path: ray/ci/pipeline/py_dep_analysis_test.py
imports: import os
  import tempfile
  import unittest
  import py_dep_analysis
label_desc: Use image node_id 8 for calling the TestPyDepAnalysis obj's underlying member method code with example usage: obj.test_from_import_class_object() without return types