code: def canned_query(n,s):
      
      qobj = qmap[n]
      chain = qobj['chain']
      prefix = qobj['prefix']
      whr = chain2where(chain + [prefix], 'x')
      query = """
      SELECT * WHERE {{
      <{s}> {w}
      }}
      """.format(s=s, w=whr)
      bindings = run_sparql(query)
      rows = [ensure_prefixed(r['x']['value'], prefix) for r in bindings]
      return rows
docs: uses canned query