def METHOD_NAME(response):
    # if ends with a smile, it's finished
    if smiles_pattern.match(response[-2:]):
        return response
    leftover = re.split(r"[.!?]", response)[-1]
    if leftover:
        # strings with no ending punctuation will be empty
        response = response[: -len(leftover)]
    # save smiles from cutting
    smile = ""
    if smiles_pattern.match(leftover.strip()[:2]):
        smile = " " + leftover.strip()[:2]
    response += smile
    return response.strip()