def get_all_user_accounts(messenger_blobs):
    """
    Parse each user account from the messenger_blobs.
    A user account is defined as the duple (user_id, network).
    For instance, the same user may have a mainnet account and
    a testnet account, and those would be treated separately.
    """
    user_accounts = set()
    for messenger_blob in messenger_blobs:
        user_accounts.add(
            (messenger_blob["user_id"], messenger_blob["dydx_config"]["environment"])
        )
    return user_accounts