original_docstring: 
      Generates LUBM graph by specified number of generated graphs to create one LUBM graph
  
      :param destination_folder: directory to save the graph
      :type destination_folder: Path
      :param count: number of generated graphs
      :type count: int
      :return: path to generated graph
      :rtype: Path
      
docstring: Generates LUBM graph by specified number of generated graphs to create one LUBM graph
docstring_tokens: Generates LUBM graph by specified number of generated graphs to create one LUBM graph
code: def gen_lubm_graph(destination_folder: Path, count: int) -> Path:
      """
      Generates LUBM graph by specified number of generated graphs to create one LUBM graph
  
      :param destination_folder: directory to save the graph
      :type destination_folder: Path
      :param count: number of generated graphs
      :type count: int
      :return: path to generated graph
      :rtype: Path
      """
  
      arch = MAIN_FOLDER / 'data' / 'LUBM' / 'uba.zip'
      univ_dir = MAIN_FOLDER / 'data' / 'LUBM' / 'univ'
      if not os.path.exists(univ_dir):
          wget.download(url=LUBM_URL, out=str(arch))
          shutil.unpack_archive(filename=str(arch), extract_dir=str(univ_dir))
          os.remove(arch)
      subprocess.run(
          'java ' +
          '-cp ' +
          'classes ' +
          'edu.lehigh.swat.bench.uba.Generator ' +
          '-univ ' +
          f'{count} ' +
          '-onto ' +
          'http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl',
          cwd=str(univ_dir),
          stdout=subprocess.PIPE,
          stderr=subprocess.PIPE,
          check=True,
          shell=True
      )
  
      output_graph = rdflib.Graph()
  
      triples = list()
  
      vertices = dict()
      next_id = 0
  
      generated_graphs = \
          os.listdir(MAIN_FOLDER / 'data' / 'LUBM') + \
          os.listdir(univ_dir)  # for Windows
  
      for tmp_graph_path in generated_graphs:
          if 'University' not in tmp_graph_path:
              continue
  
          tmp_graph_path = f"{MAIN_FOLDER / 'data' / 'LUBM'}/{tmp_graph_path}"
          tmp_graph = rdflib.Graph()
          tmp_graph.parse(tmp_graph_path)
  
          for subj, pred, obj in tmp_graph:
              for tmp in [subj, obj]:
                  if tmp not in vertices:
                      vertices[tmp] = next_id
                      next_id += 1
              triples.append((vertices[subj], pred, vertices[obj]))
  
          os.remove(tmp_graph_path)
  
      for subj, pred, obj in tqdm(triples, desc=f'lubm_{count} generation'):
          add_rdf_edge(subj, pred, obj, output_graph, reverse=True)
  
      target = destination_folder / f'lubm_{count}.xml'
  
      write_to_rdf(target, output_graph)
  
      return target
code_tokens: def gen_lubm_graph ( destination_folder : Path , count : int ) -> Path : arch = MAIN_FOLDER / 'data' / 'LUBM' / 'uba.zip' univ_dir = MAIN_FOLDER / 'data' / 'LUBM' / 'univ' if not os . path . exists ( univ_dir ) : wget . download ( url = LUBM_URL , out = str ( arch ) ) shutil . unpack_archive ( filename = str ( arch ) , extract_dir = str ( univ_dir ) ) os . remove ( arch ) subprocess . run ( 'java ' + '-cp ' + 'classes ' + 'edu.lehigh.swat.bench.uba.Generator ' + '-univ ' + f'{count} ' + '-onto ' + 'http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl' , cwd = str ( univ_dir ) , stdout = subprocess . PIPE , stderr = subprocess . PIPE , check = True , shell = True ) output_graph = rdflib . Graph ( ) triples = list ( ) vertices = dict ( ) next_id = 0 generated_graphs = os . listdir ( MAIN_FOLDER / 'data' / 'LUBM' ) + os . listdir ( univ_dir ) for tmp_graph_path in generated_graphs : if 'University' not in tmp_graph_path : continue tmp_graph_path = f"{MAIN_FOLDER / 'data' / 'LUBM'}/{tmp_graph_path}" tmp_graph = rdflib . Graph ( ) tmp_graph . parse ( tmp_graph_path ) for subj , pred , obj in tmp_graph : for tmp in [ subj , obj ] : if tmp not in vertices : vertices [ tmp ] = next_id next_id += 1 triples . append ( ( vertices [ subj ] , pred , vertices [ obj ] ) ) os . remove ( tmp_graph_path ) for subj , pred , obj in tqdm ( triples , desc = f'lubm_{count} generation' ) : add_rdf_edge ( subj , pred , obj , output_graph , reverse = True ) target = destination_folder / f'lubm_{count}.xml' write_to_rdf ( target , output_graph ) return target
short_docstring: Generates LUBM graph by specified number of generated graphs to create one LUBM graph
short_docstring_tokens: Generates LUBM graph by specified number of generated graphs to create one LUBM graph
comment: """
      Generates LUBM graph by specified number of generated graphs to create one LUBM graph
  
      :param destination_folder: directory to save the graph
      :type destination_folder: Path
      :param count: number of generated graphs
      :type count: int
      :return: path to generated graph
      :rtype: Path
      """$SEP$# for Windows