def _generate_payload(sentence):
    """
    Helper function to prep the payload data structure. Also a good
    place to manipulate the payload (e.g., lower-casing if needed)

    Args:
        sentence: sentence to be used for the inference (str)
    Returns:
        dictionary of the prediction payload, the input data is nested below a
        "instances" key as a list of dicts with the different input tensors
        More details: https://cloud.google.com/ml-engine/docs/v1/predict-request
    """
    return {"instances": [{"sentence": sentence}]}