code: def test_intersection(self, regions, expected):
      regions_list = [ranges.RangeSet.from_regions(r) for r in regions]
      copies = [ranges.RangeSet(rs) for rs in regions_list]
  
      # Check that the intersection is as expected.
      self.assertCountEqual(
          ranges.RangeSet.from_regions(expected),
          regions_list[0].intersection(*regions_list[1:]),
      )
  
      # Check that the intersection is as expected even if we do it in a different
      # direction.
      self.assertCountEqual(
          ranges.RangeSet.from_regions(expected),
          regions_list[-1].intersection(*regions_list[:-1]),
      )
  
      # Check that no one was modified.
      for pre, post in zip(copies, regions_list):
          self.assertCountEqual(pre, post)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import itertools
  from absl.testing import absltest
  from absl.testing import parameterized
  import mock
  from third_party.nucleus.protos import position_pb2
  from third_party.nucleus.protos import reference_pb2
  from third_party.nucleus.protos import variants_pb2
  from third_party.nucleus.testing import test_utils
  from third_party.nucleus.util import ranges
label_desc: Use image node_id 21 for calling the RangesTests obj's underlying member method code with example usage: obj.test_intersection(regions, expected) without return types