def METHOD_NAME(filename, headonly=False, verify_chksum=True,
               **kwargs):  # @UnusedVariable
    """
    Reads a GSE2 file and returns a Stream object.
    GSE2 files containing multiple WID2 entries/traces are supported.
    .. warning::
        This function should NOT be called directly, it registers via the
        ObsPy :func:`~obspy.core.stream.read` function, call this instead.
    :type filename: str
    :param filename: GSE2 file to be read.
    :type headonly: bool, optional
    :param headonly: If True read only head of GSE2 file.
    :type verify_chksum: bool, optional
    :param verify_chksum: If True verify Checksum and raise Exception if
        it is not correct.
    :rtype: :class:`~obspy.core.stream.Stream`
    :returns: Stream object containing header and data.
    .. rubric:: Example
    >>> from obspy import read
    >>> st = read("/path/to/loc_RJOB20050831023349.z")
    """
    traces = []
    with open(filename, 'rb') as f:
        # reading multiple gse2 parts
        while True:
            try:
                if headonly:
                    header = libgse2.read_header(f)
                    traces.append(Trace(header=header))
                else:
                    header, data = libgse2.read(f, verify_chksum=verify_chksum)
                    traces.append(Trace(header=header, data=data))
            except EOFError:
                break
    return Stream(traces=traces)