code: def autofix_records(
      records: Sequence[BaseRecord], show_pbar: bool = True
  ) -> Sequence[BaseRecord]:
      keep_records = []
      for record in pbar(records, show=show_pbar):
          try:
              record.autofix()
              keep_records.append(record)
          except AutofixAbort as e:
              logger.warning(
                  "(record_id: {}) - "
                  "🚫 Record could not be autofixed and will be removed because: {}",
                  record.record_id,
                  str(e),
              )
  
      return keep_records
  
file_path: icevision/icevision/core/record.py
imports: from icevision.imports import *
  from icevision.utils import *
  from icevision.core.exceptions import *
  from icevision.core.components import *
  from icevision.core.record_components import *
label_desc: Use image node_id 1 for calling a global function with example usage: autofix_records(records, show_pbar) and returns: keep_records