code: def select_windows(config, ref_reader, reads, region):
      """ "Process reads to determine candidate windows for local assembly.
  
      Windows are within range of
        [0 - config.min_windows_distance, ref_len + config.min_windows_distance)
  
      Args:
        config: learning.genomics.deepvariant.realigner.WindowSelectorOptions
          options determining the behavior of this window selector.
        ref_reader: GenomeReference. Indexed reference genome to query bases.
        reads: A list of genomics.Read records.
        region: nucleus.protos.Range. The region we are processing.
  
      Returns:
        A list of nucleus.protos.Range protos sorted by their genomic position.
      """
      # This is a fast path for the case where we have no reads, so we have no
      # windows to assemble.
      if not reads:
          return []
  
      candidates = _candidates_from_reads(
          config, ref_reader, reads, region
      )
      return _candidates_to_windows(
          config, candidates, region.reference_name
      )
  
file_path: deepvariant/deepvariant/realigner/window_selector.py
imports: from third_party.nucleus.protos import reads_pb2
  from third_party.nucleus.util import ranges
  from deepvariant.protos import deepvariant_pb2
  from deepvariant.protos import realigner_pb2
  from deepvariant.python import allelecounter
  from deepvariant.realigner.python import window_selector
label_desc: Use image node_id 5 for calling a global function with example usage: select_windows(config, ref_reader, reads, region) and returns: _candidates_to_windows, list