code: def testGroupByPivot_RequireAll(self):
      a1, a2, a3, b1, b2, b4, c1, c3, c4 = self._prepare_tfx_artifacts(
          9
      )
      self._put_lineage(a1, [b1, c1])
      self._put_lineage(a2, b2)
      self._put_lineage(a3, c3)
      self._put_lineage([], [b4, c4])
      inputs = {
          "a": [a1, a2, a3],
          "b": [b1, b2, b4],
          "c": [c1, c3, c4],
      }
  
      with self.subTest("Group by b"):
          result = self._group_by_pivot(inputs, pivot_key="b")
          self.assertEqual(
              result,
              [
                  {"a": [a1], "b": [b1], "c": [c1]},
                  {"a": [a2], "b": [b2], "c": []},
                  {"a": [], "b": [b4], "c": [c4]},
              ],
          )  # pyformat: disable
  
      with self.subTest("Require all"):
          result = self._group_by_pivot(
              inputs, pivot_key="b", require_all=True
          )
          self.assertEqual(result, [{"a": [a1], "b": [b1], "c": [c1]}])
  
imports: import random
  from absl.testing import parameterized
  import tensorflow
  from tfx.dsl.input_resolution.ops import group_by_lineage_op
  from tfx.dsl.input_resolution.ops import test_utils
  from tfx.orchestration.portable.input_resolution import exceptions
  from tfx.types import artifact_utils
  from tfx.utils import test_case_utils
label_desc: Use image node_id 6 for calling the GroupByPivotTest obj's underlying member method code with example usage: obj.testGroupByPivot_RequireAll() without return types