class_docstr: Base class for all parsers, implements the main parsing logic.
  
  The actual fields to be parsed are defined by the mixins used when
  defining a custom parser. The only required fields for all parsers
  are `image_id` and `image_width_height`.
  
  # Arguments
      idmap: Maps from filenames to unique ids, pass an `IDMap()` if you need this information.
  
  # Examples
  
  Create a parser for image filepaths.
  ```python
  class FilepathParser(Parser, FilepathParserMixin):
      # implement required abstract methods
  ```
code: def generate_template(cls, record):
      record_builder_template = record.builder_template()
  
      template = CodeTemplate()
      template.add_line(f"class MyParser({cls.__name__}):", 0)
      template.add_line(f"def __init__(self, template_record):", 1)
      template.add_line(
          f"super().__init__(template_record=template_record)", 2
      )
      template.add_line(f"def __iter__(self) -> Any:", 1)
      template.add_line(f"def __len__(self) -> int:", 1)
      # template.add_line("def create_record(self) -> BaseRecord:", 1)
      # template.add_line(f"return {record.__class__.__name__}({components_names})", 2)
      template.add_line("def record_id(self, o: Any) -> Hashable:", 1)
      template.add_line(
          "def parse_fields(self, o: Any, record: BaseRecord, is_new: bool):",
          1,
      )
      template.add_lines(record_builder_template, 2)
  
      template.display()
  
imports: from icevision.imports import *
  from icevision.utils import *
  from icevision.utils.code_template import *
  from icevision.core import *
  from icevision.data import *
label_desc: Use image node_id 10 for calling the Parser obj's underlying member method code with example usage: obj.generate_template(cls, record) without return types