docs: def run(graph, save_on_github=False, main_entity=None):
      """
      2016-11-30
      """
  
      try:
          ontology = graph.all_ontologies[0]
          uri = ontology.uri
      except:
          ontology = None
          uri = ";".join([s for s in graph.sources])
  
      # ontotemplate = open("template.html", "r")
      ontotemplate = open(ONTODOCS_VIZ_TEMPLATES + "sigmajs.html", "r")
  
      t = Template(ontotemplate.read())
  
      dict_graph = build_class_json(graph.classes)
      JSON_DATA_CLASSES = json.dumps(dict_graph)
  
      if False:
          c_mylist = build_D3treeStandard(0, 99, 1, graph.toplayer_classes)
          p_mylist = build_D3treeStandard(0, 99, 1, graph.toplayer_properties)
          s_mylist = build_D3treeStandard(0, 99, 1, graph.toplayer_skos)
  
          c_total = len(graph.classes)
          p_total = len(graph.all_properties)
          s_total = len(graph.all_skos_concepts)
  
          # hack to make sure that we have a default top level object
          JSON_DATA_CLASSES = json.dumps({'children' : c_mylist, 'name' : 'owl:Thing', 'id' : "None" })
          JSON_DATA_PROPERTIES = json.dumps({'children' : p_mylist, 'name' : 'Properties', 'id' : "None" })
          JSON_DATA_CONCEPTS = json.dumps({'children' : s_mylist, 'name' : 'Concepts', 'id' : "None" })
  
  
      c = Context({
                      "ontology": ontology,
                      "main_uri" : uri,
                      "STATIC_PATH": ONTODOCS_VIZ_STATIC,
                      "classes": graph.classes,
                      "classes_TOPLAYER": len(graph.toplayer_classes),
                      "properties": graph.all_properties,
                      "properties_TOPLAYER": len(graph.toplayer_properties),
                      "skosConcepts": graph.all_skos_concepts,
                      "skosConcepts_TOPLAYER": len(graph.toplayer_skos),
                      # "TOTAL_CLASSES": c_total,
                      # "TOTAL_PROPERTIES": p_total,
                      # "TOTAL_CONCEPTS": s_total,
                      'JSON_DATA_CLASSES' : JSON_DATA_CLASSES,
                      # 'JSON_DATA_PROPERTIES' : JSON_DATA_PROPERTIES,
                      # 'JSON_DATA_CONCEPTS' : JSON_DATA_CONCEPTS,
                  })
  
      rnd = t.render(c)
  
      return safe_str(rnd)