def get_meta_appversion_text(form_metadata):
    try:
        text = form_metadata['appVersion']
    except __HOLE__:
        return None

    # just make sure this is a longish string and not something like '2.0'
    if isinstance(text, (str, unicode)) and len(text) > 5:
        return text
    else:
        return None
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/receiverwrapper/util.py/get_meta_appversion_text