code: def get_all_item_data(items, conn, graph=None, output='json', **kwargs):
      
      # set the jinja2 template to use
      if kwargs.get('template'):
          template = kwargs.pop('template')
      else:
          template = "sparqlAllItemDataTemplate.rq"
      # build the keyword arguments for the templace
      template_kwargs = {"prefix": NSM.prefix(), "output": output}
      if isinstance(items, list):
          template_kwargs['uri_list'] = items
      else:
          template_kwargs['item_uri'] = Uri(items).sparql
      if kwargs.get("special_union"):
          template_kwargs['special_union'] = kwargs.get("special_union")
      if kwargs.get('rdfclass'):
          # pdb.set_trace()
          template_kwargs.update(kwargs['rdfclass'].query_kwargs)
      if kwargs.get("filters"):
          template_kwargs['filters'] = make_sparql_filter(kwargs.get('filters'))
      sparql = render_without_request(template, **template_kwargs)
      return conn.query(sparql, **kwargs)
docs: queries a triplestore with the provided template or uses a generic
      template that returns triples 3 edges out in either direction from the
      provided item_uri
  
      args:
          items: the starting uri or list of uris to the query
          conn: the rdfframework triplestore connection to query against
          output: 'json' or 'rdf'
  
      kwargs:
          template: template to use in place of the generic template
          rdfclass: rdfclass the items are based on.
          filters: list of filters to apply