def register_user(register_user):
    url = BH_URL + "/api/v1/user"
    try:
        response = requests.post(url,
                                 data=register_user.to_JSON(),
                                 headers=json_headers)
        response.raise_for_status()

        # Return our username on a successful response
        return register_user.username

    except ConnectionError as error:
        print("Looks like there's a connection error. Please try again later")
    except __HOLE__ as error:
        if response.status_code == 409:
            print(response.text)
        else:
            print(error)
            print("Please try again...")
    return None
dataset/ETHPy150Open rcaloras/bashhub-client/bashhub/rest_client.py/register_user