code: def store_ref_block_max_length(vds_path):
      """Patches an existing VDS file to store the max reference block length for faster interval filters.
  
      This method permits :func:`.vds.filter_intervals` to remove reference data not overlapping a target interval.
  
      This method is able to patch an existing VDS file in-place, without copying all the data. However,
      if significant downstream interval filtering is anticipated, it may be advantageous to run
      :func:`.vds.truncate_reference_blocks` to truncate long reference blocks and make interval filters
      even faster. However, truncation requires rewriting the entire VDS.
  
  
      Examples
      --------
      >>> hl.vds.store_ref_block_max_length('gs://path/to/my.vds')  # doctest: +SKIP
  
      See Also
      --------
      :func:`.vds.filter_intervals`, :func:`.vds.truncate_reference_blocks`.
  
      Parameters
      ----------
      vds_path : :obj:`str`
      """
      vds = hl.vds.read_vds(vds_path)
  
      if (
          VariantDataset.ref_block_max_length_field
          in vds.reference_data.globals
      ):
          warning(
              f"VDS at {vds_path} already contains a global annotation with the max reference block length"
          )
          return
      rd = vds.reference_data
      rd = rd.annotate_rows(__start_pos=rd.locus.position)
      fs = hl.current_backend().fs
      ref_block_max_len = rd.aggregate_entries(
          hl.agg.max(rd.END - rd.__start_pos + 1)
      )
      with fs.open(
          os.path.join(vds_path, extra_ref_globals_file), "w"
      ) as f:
          json.dump(
              {
                  VariantDataset.ref_block_max_length_field: ref_block_max_len
              },
              f,
          )
  
imports: import os
  import hail
  from hail.matrixtable import MatrixTable
  from hail.typecheck import typecheck_method
  from hail.utils.java import info, warning
  from hail.genetics import ReferenceGenome
  import json
label_desc: Use image node_id 2 for calling a global function with example usage: store_ref_block_max_length(vds_path) without return types