def METHOD_NAME(file_data: BinaryIO) -> str:
    # Should not use base64.encodestring() which inserts newlines every
    # 76 characters (per RFC 1521).  Chromedriver has to remove those
    # unnecessary newlines before decoding, causing performance hit.
    return base64.b64encode(file_data.read()).decode("utf-8")