def METHOD_NAME(self, datum):
    if "key" in datum:
        key = datum["key"]
    else:
        key = None
    if "input" in datum:
        inp = datum["input"]
    else:
        inp = None
    if "text" in datum:
        text = datum["text"]
    else:
        text = None
    if key is not None and inp is not None and text is not None:
        return {"key": key, "input": inp, "text": text}
    # TODO
    return datum