parameters: (archive_file: io.BufferedIOBase)
docstring: Checks if the file has the correct archive header signature.
  
    The cursor is moved to the first available file header section after
    successfully checking the signature.
  
    Args:
      archive_file: The archive file object pointing at its beginning.
  
    Raises:
      RuntimeError: The archive signature is invalid.
docstring_summary: Checks if the file has the correct archive header signature.
docstring_tokens: Checks if the file has the correct archive header signature .
function: def _check_archive_signature(archive_file: io.BufferedIOBase) -> None:
    """Checks if the file has the correct archive header signature.
  
    The cursor is moved to the first available file header section after
    successfully checking the signature.
  
    Args:
      archive_file: The archive file object pointing at its beginning.
  
    Raises:
      RuntimeError: The archive signature is invalid.
    """
    signature = archive_file.read(8)
    if signature != b'!<arch>\n':
      raise RuntimeError('Invalid archive file format.')
function_tokens: def _check_archive_signature ( archive_file : io . BufferedIOBase ) -> None : signature = archive_file . read ( 8 ) if signature != b'!<arch>\n' : raise RuntimeError ( 'Invalid archive file format.' )