code: def _createWorkingDir(rootdir,input):
      
      # extract rootname from input
      rootname = input[:input.find('_')]
      newdir = os.path.join(rootdir,rootname)
      if not os.path.exists(newdir):
          os.mkdir(newdir)
      return newdir
docs: Create a working directory based on input name under the parent directory specified as rootdir