def __extract_xmls_from_file(filename: str) -> list:
    """
    Reads a given file and extract all XML-s from it by <?xml... declaration.
    Used to support inputs, which may contain multiple XML-s in a single file.

    :param filename: input file name
    :return: read files as list of byte arrays.
    """
    result = []
    with open(filename, 'r+b') as file:
        content = file.read()
    startidx = 0
    while True:
        nextidx = content.find(b'<?xml', startidx + 1)
        if nextidx >= 0:
            result.append(content[startidx:nextidx])
            startidx = nextidx
        else:
            result.append(content[startidx:])
            break
    return result