code: def get_perm_codename(perm, fail_silently=True):
      
      try:
          perm = perm.split('.', 1)[1]
      except IndexError as e:
          if not fail_silently:
              raise e
      return perm
docs: Get permission codename from permission-string.
  
      Examples
      --------
      >>> get_perm_codename('app_label.codename_model')
      'codename_model'
      >>> get_perm_codename('app_label.codename')
      'codename'
      >>> get_perm_codename('codename_model')
      'codename_model'
      >>> get_perm_codename('codename')
      'codename'
      >>> get_perm_codename('app_label.app_label.codename_model')
      'app_label.codename_model'