<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_name(cls, action, full=True):
 """ Return the name of the permission for a given model and action. By default it returns the full permission name `app_label.perm_codename`. If `full=False`, it returns only the `perm_codename`. """

    codename = "{}_{}".format(action, cls.__name__.lower())
    if full:
        return "{}.{}".format(cls._meta.app_label, codename)
    return codename