code: def test_filter_intervals_segment():
      vds = hl.vds.read_vds(
          os.path.join(resource("vds"), "1kg_2samples_starts.vds")
      )
  
      intervals = [
          hl.parse_locus_interval(
              "chr22:10514784-10517000", reference_genome="GRCh38"
          )
      ]
      filt = hl.vds.filter_intervals(
          vds, intervals, split_reference_blocks=True
      )
  
      assert hl.vds.to_dense_mt(filt)._same(
          hl.filter_intervals(hl.vds.to_dense_mt(vds), intervals)
      )
  
      ref = filt.reference_data
      var = filt.variant_data
      assert ref.aggregate_rows(
          hl.agg.all(intervals[0].contains(ref.locus))
      )
      assert var.aggregate_rows(
          hl.agg.all(intervals[0].contains(var.locus))
      )
  
imports: import os
  import pytest
  import hail
  from hail.utils import new_temp_file
  from hail.vds.combiner.combine import defined_entry_fields
  from ..helpers import resource, test_timeout, qobtest
label_desc: Use image node_id 16 for calling a global function with example usage: test_filter_intervals_segment() without return types