def METHOD_NAME(current_country, fail_if_not_found=False):
    """ Get the two-character country code for a given country name """
    try:
        return pycountry.countries.lookup(current_country).alpha_2
    except LookupError:
        return None if fail_if_not_found else current_country