def METHOD_NAME(src: bytes, **kwargs: Any) -> bytes:
    """Wrapper for use with the encoder interface.
    Parameters
    ----------
    src : bytes
        A single frame of little-endian ordered image data to be RLE encoded.
    **kwargs
        Required parameters:
        * `rows`: int
        * `columns`: int
        * `samples_per_pixel`: int
        * `bits_allocated`: int
    Returns
    -------
    bytes
        An RLE encoded frame.
    """
    if kwargs.get("byteorder", "<") == ">":
        raise ValueError(
            "Unsupported option for the 'pydicom' encoding plugin: "
            f"\"byteorder = '{kwargs['byteorder']}'\""
        )
    samples_per_pixel = kwargs["samples_per_pixel"]
    bits_allocated = kwargs["bits_allocated"]
    bytes_allocated = bits_allocated // 8
    nr_segments = bytes_allocated * samples_per_pixel
    if nr_segments > 15:
        raise ValueError(
            "Unable to encode as the DICOM standard only allows "
            "a maximum of 15 segments in RLE encoded data"
        )
    rle_data = bytearray()
    seg_lengths = []
    for sample_nr in range(samples_per_pixel):
        for byte_offset in reversed(range(bytes_allocated)):
            idx = byte_offset + bytes_allocated * sample_nr
            segment = _encode_segment(src[idx::nr_segments], **kwargs)
            rle_data.extend(segment)
            seg_lengths.append(len(segment))
    # Add the number of segments to the header
    rle_header = bytearray(pack("<L", len(seg_lengths)))
    # Add the segment offsets, starting at 64 for the first segment
    # We don't need an offset to any data at the end of the last segment
    offsets = [64]
    for ii, length in enumerate(seg_lengths[:-1]):
        offsets.append(offsets[ii] + length)
    rle_header.extend(pack(f"<{len(offsets)}L", *offsets))
    # Add trailing padding to make up the rest of the header (if required)
    rle_header.extend(b"\x00" * (64 - len(rle_header)))
    return bytes(rle_header + rle_data)