code: def _get_gid(name):
      
      if getgrnam is None or name is None:
          return None
      try:
          result = getgrnam(name)
      except KeyError:
          result = None
      if result is not None:
          return result[2]
      return None
docs: Returns a gid, given a group name.