code: def test_duplicated_label(self):
      program = lp_program.Program("foo")
      node1 = mock.Mock(autospec=base.Node)
      node2 = mock.Mock(autospec=base.Node)
      program.add_node(node1, "foo")
      program.add_node(node2, "foo")
      with program.group("bar"):
          program.add_node(node1)
      with program.group("bar"):
          program.add_node(node2)
      self.assertEqual(program.groups["foo"], [node1, node2])
      self.assertEqual(program.groups["bar"], [node1, node2])
  
file_path: launchpad/launchpad/program_test.py
imports: from unittest import mock
  from absl.testing import absltest
  from launchpad import program
  from launchpad.nodes import base
label_desc: Use image node_id 8 for calling the ProgramTest obj's underlying member method code with example usage: obj.test_duplicated_label() without return types