code: def record_is_valid(record):
      "Checks if a record is valid for processing."
  
      # No random contigs
      if record.CHROM.startswith('GL'):
          return False
  
      # Skip results with a read depth < 5. If no read depth is specified then
      # we have no choice but to consider this record as being valid.
      if 'DP' in record.INFO and record.INFO['DP'] < 5:
          return False
  
      return Truf record_is_valid(record):
      "Checks if a record is valid for processing."
  
      # No random contigs
      if record.CHROM.startswith('GL'):
          return False
  
      # Skip results with a read depth < 5. If no read depth is specified then
      # we have no choice but to consider this record as being valid.
      if 'DP' in record.INFO and record.INFO['DP'] < 5:
          return False
  
      return True
docs: Checks if a record is valid for processing.