code: def getNextPID(self, numPIDs=None, namespace=None):
          
          http_args = {'format': 'xml'}
          if numPIDs:
              http_args['numPIDs'] = numPIDs
          if namespace:
              http_args['namespace'] = namespace
  
          rel_url = 'objects/nextPID'
          return self.post(rel_url, params=http_args)
docs: Wrapper function for `Fedora REST API getNextPid <http://fedora-commons.org/confluence/display/FCR30/REST+API#RESTAPI-getNextPID>`_
  
          :param numPIDs: (optional) get the specified number of pids;
              by default, returns 1
          :param namespace: (optional) get the next pid in the specified
              pid namespace; otherwise, Fedora will return the next pid
              in the configured default namespace.
          :rtype: string (if only 1 pid requested) or list of strings (multiple pids)