code: def get_data_flow(code, parser):
      try:
          tree = parser[0].parse(bytes(code, "utf8"))
          root_node = tree.root_node
          tokens_index = tree_to_token_index(root_node)
          code = code.split("\n")
          code_tokens = [
              index_to_code_token(x, code) for x in tokens_index
          ]
          index_to_code = {}
          for idx, (index, code) in enumerate(
              zip(tokens_index, code_tokens)
          ):
              index_to_code[index] = (idx, code)
          try:
              DFG, _ = parser[1](root_node, index_to_code, {})
          except:
              DFG = []
          DFG = sorted(DFG, key=lambda x: x[1])
          indexs = set()
          for d in DFG:
              if len(d[-1]) != 0:
                  indexs.add(d[1])
              for x in d[-1]:
                  indexs.add(x)
          new_DFG = []
          for d in DFG:
              if d[1] in indexs:
                  new_DFG.append(d)
          codes = code_tokens
          dfg = new_DFG
      except:
          codes = code.split()
          dfg = []
      # merge nodes
      dic = {}
      for d in dfg:
          if d[1] not in dic:
              dic[d[1]] = d
          else:
              dic[d[1]] = (
                  d[0],
                  d[1],
                  d[2],
                  list(set(dic[d[1]][3] + d[3])),
                  list(set(dic[d[1]][4] + d[4])),
              )
      DFG = []
      for d in dic:
          DFG.append(dic[d])
      dfg = DFG
      return dfg
  
file_path: codet5/CodeT5/evaluator/CodeBLEU/dataflow_match.py
imports: from CodeT5.evaluator.CodeBLEU.parser import DFG_python, DFG_java, DFG_ruby, DFG_go, DFG_php, DFG_javascript, DFG_csharp
  from CodeT5.evaluator.CodeBLEU.parser import remove_comments_and_docstrings, tree_to_token_index, index_to_code_token
  from tree_sitter import Language, Parser
  import os
label_desc: Use image node_id 3 for calling a global function with example usage: get_data_flow(code, parser) and returns: dfg