<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_perm_codename(perm, fail_silently=True):
 """ Get permission codename from permission-string. Examples -------- 'codename_model' 'codename' 'codename_model' 'codename' 'app_label.codename_model' """

    try:
        perm = perm.split('.', 1)[1]
    except IndexError as e:
        if not fail_silently:
            raise e
    return perm