code: def _ensure_pgrp(self):
          
          if not LAST_PGRP_PATH:  # global
              return
          try:
              with open(LAST_PGRP_PATH, 'w') as f:
                  f.write(str(os.getpgrp()) + "\n")
          except IOError:
              # raised if no permissions or disk space
              pass
docs: Ensures that the pgrp file is present and up to date. There have
          been production cases where the file was lost or not
          immediately emitted due to disk space issues.