code: def type_weights(group):
      index = group["type"].values
      data = group["weight"].values
      return pd.Series(data=data, index=index)
  
file_path: deepgraph/doc/source/tutorials/terrorists.py
imports: import os
  import subprocess
  import zipfile
  import matplotlib.pyplot
  import numpy
  import pandas
  import deepgraph
  import graph_tool.draw
label_desc: Use image node_id 1 for calling a global function with example usage: type_weights(group) and returns: pd