<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def checkIfEmailWasHacked(email=None, sleepSeconds=1):
 """ Method that checks if the given email is stored in the HIBP website. This function automatically waits a second to avoid problems with the API rate limit. An example of the json received: ``` [{"Title":"Adobe","Name":"Adobe","Domain":"adobe.com","BreachDate":"2013-10-4","AddedDate":"2013-12-04T00:12Z","PwnCount":152445165,"Description":"The big one. In October 2013, 153 million Adobe accounts were breached with each containing an internal ID, username, email, <em>encrypted</em> password and a password hint in plain text. The password cryptography was poorly done and <a href=\"http://stricture-group.com/files/adobe-top100.txt\" target=\"_blank\">many were quickly resolved back to plain text</a>. The unencrypted hints also <a href=\"http://www.troyhunt.com/2013/11/adobe-credentials-and-serious.html\" target=\"_blank\">disclosed much about the passwords</a> adding further to the risk that hundreds of millions of Adobe customers already faced.","DataClasses":["Email addresses","Password hints","Passwords","Usernames"]}] ``` Args: ----- email: Email to verify in HIBP. Returns: -------- A python structure for the json received. If nothing was found, it will return an empty list. """

    # Sleeping just a little bit
    time.sleep(sleepSeconds)

    print("\t[*] Bypassing Cloudflare Restriction...")
    ua = 'osrframework 0.18'
    useragent = {'User-Agent': ua}
    cookies, user_agent = cfscrape.get_tokens('https://haveibeenpwned.com/api/v2/breachedaccount/test@example.com', user_agent=ua)

    leaks = []

    apiURL = "https://haveibeenpwned.com/api/v2/breachedaccount/{}".format(email)

    # Accessing the HIBP API
    time.sleep(sleepSeconds)
    # Building API query
    data = requests.get(
        apiURL,
        headers=useragent,
        cookies=cookies,
        verify=True
    ).text

    # Reading the text data onto python structures
    try:
        jsonData = json.loads(data)

        for e in jsonData:
            # Building the i3visio like structure
            new = {}
            new["value"] = "(HIBP) " + e.get("Name") + " - " + email
            new["type"] = "i3visio.profile"
            new["attributes"] = [
                {
                    "type": "i3visio.platform_leaked",
                    "value": e.get("Name"),
                    "attributes": []
                },
                {
                    "type": "@source",
                    "value": "haveibeenpwned.com",
                    "attributes": []
                },
                {
                    "type": "@source_uri",
                    "value": apiURL,
                    "attributes": []
                },
                {
                    "type": "@pwn_count",
                    "value": e.get("PwnCount"),
                    "attributes": []
                },
                {
                    "type": "@added_date",
                    "value": e.get("AddedDate"),
                    "attributes": []
                },
                {
                    "type": "@breach_date",
                    "value": e.get("BreachDate"),
                    "attributes": []
                },
                {
                    "type": "@description",
                    "value": e.get("Description"),
                    "attributes": []
                }
            ] + general.expandEntitiesFromEmail(email)
            leaks.append(new)
    except ValueError:
        return []
    except Exception:
        print("ERROR: Something happenned when using HIBP API.")
        return []

    return leaks