docs: def parse_header(self, parsed_samples=None):
          """Read and parse :py:class:`vcfpy.header.Header` from file, set
          into ``self.header`` and return it
  
          :param list parsed_samples: ``list`` of ``str`` for subsetting the
              samples to parse
          :returns: ``vcfpy.header.Header``
          :raises: ``vcfpy.exceptions.InvalidHeaderException`` in the case of
              problems reading the header
          """
          # parse header lines
          sub_parser = HeaderParser()
          header_lines = []
          while self._line and self._line.startswith("##"):
              header_lines.append(sub_parser.parse_line(self._line))
              self._read_next_line()
          # parse sample info line
          self.samples = self._handle_sample_line(parsed_samples)
          # construct Header object
          self.header = header.Header(header_lines, self.samples)
          # check header for consistency
          self._header_checker.run(self.header)
          # construct record parser
          self._record_parser = RecordParser(self.header, self.samples, self.record_checks)
          # read next line, must not be header
          self._read_next_line()
          if self._line and self._line.startswith("#"):
              raise exceptions.IncorrectVCFFormat(
                  'Expecting non-header line or EOF after "#CHROM" line'
              )
          return self.header