@staticmethod
def _remove_line_ending(line: bytes):
    """
        To not have to deal with line endings in the data we can use this to
        remove them.
        """
    if line.endswith(b'\r\n'):
        return line[:-2]
    else:
        return line
