code: def nobody_uid():
      
      global nobody
      if nobody:
          return nobody
      try:
          import pwd
      except ImportError:
          return -1
      try:
          nobody = pwd.getpwnam('nobody')[2]
      except KeyError:
          nobody = 1 + max(x[2] for x in pwd.getpwall())
      return nobody
docs: Internal routine to get nobody's uid