def _getProfile(APIConn, screenName=None, userID=None):
    """
    Get data of one profile from the Twitter API, for a specified user.

    Either screenName string or userID integer must be specified, but not both.

    :param APIConn: authenticated API connection object.
    :param screenName: The name of Twitter user to fetch, as a string.
    :param userID: The ID of the Twitter user to fetch, as an integer.
        Cannot be set if screenName is also set.

    :return tweepy.User: instance for requested Twitter user.
    """
    assert (
        screenName or userID
    ), "Expected either screenName (str) or userID (int) to be set."
    assert not (
        screenName and userID
    ), "Cannot set both screenName ({screenName}) and userID ({userID}).".format(
        screenName=screenName, userID=userID
    )

    if screenName:
        print("Fetching user: @{screenName}".format(screenName=screenName))
        params = {"screen_name": screenName}
    else:
        print("Fetching user ID: {userID}".format(userID=userID))
        params = {"user_id": userID}

    return APIConn.get_user(**params)