def METHOD_NAME(file: str, contents: bytes = False) -> str:
    if not contents:
        try:
            contents = Path(file).read_bytes().decode("latin-1", errors="ignore")
        except Exception as e:
            fatal_error(f"{e.message}")
    else:
        if isinstance(contents, bytes):
            contents = contents.decode("latin-1", errors="ignore")
    encoded_data = re.findall(r"#@~\^......==(.+)......==\^#~@", contents)
    return "\n".join(decode_data(data) for data in encoded_data)