code: def _id_resolv(self, iid, named=True, uid=True):
          '''
          Resolve local users and groups.
  
          :param iid:
          :param named:
          :param uid:
          :return:
          '''
  
          if not self.local_identity:
              self.local_identity['users'] = self._get_local_users()
              self.local_identity['groups'] = self._get_local_groups()
  
          if not named:
              return iid
  
          for name, meta in self.local_identity[uid and 'users' or 'groups'].items():
              if (uid and int(meta.get('uid', -1)) == iid) or (not uid and int(meta.get('gid', -1)) == iid):
                  return name
  
          return iif _id_resolv(self, iid, named=True, uid=True):
          '''
          Resolve local users and groups.
  
          :param iid:
          :param named:
          :param uid:
          :return:
          '''
  
          if not self.local_identity:
              self.local_identity['users'] = self._get_local_users()
              self.local_identity['groups'] = self._get_local_groups()
  
          if not named:
              return iid
  
          for name, meta in self.local_identity[uid and 'users' or 'groups'].items():
              if (uid and int(meta.get('uid', -1)) == iid) or (not uid and int(meta.get('gid', -1)) == iid):
                  return name
  
          return iid
docs: Resolve local users and groups.
  
          :param iid:
          :param named:
          :param uid:
          :return: