code: def getWeight(grph, nd1, nd2, weightString = "weight", returnType = int):
      
      if not weightString:
          return returnType(1)
      else:
          return returnType(grph.edges[nd1, nd2][weightString])
docs: A way of getting the weight of an edge with or without weight as a parameter
      returns a the value of the weight parameter converted to returnType if it is given or 1 (also converted) if not