code: def get_current_head_version(graph):
      
      script_dir = ScriptDirectory("/", version_locations=[graph.metadata.get_path("migrations")])
      return script_dir.get_current_head()
docs: Returns the current head version.