def get_analysis(tex_root):
 if (tex_root is None):
  return
 elif isinstance(tex_root, sublime.View):
  tex_root = get_tex_root(tex_root)
 elif (not isinstance(tex_root, strbase)):
  raise ValueError('tex_root must be a string or view')
 result = cache.cache(tex_root, 'analysis', (lambda : analyze_document(tex_root)))
 return result

def get_analysis ( tex_root ) : if ( tex_root is None ) : return elif isinstance ( tex_root , sublime . View ) : tex_root = get_tex_root ( tex_root ) elif ( not isinstance ( tex_root , strbase ) ) : raise ValueError ( 'tex_root must be a string or view' ) result = cache . cache ( tex_root , 'analysis' , ( lambda : analyze_document ( tex_root ) ) ) return result
returns an analysis of the document using a cache use this method if you want a fast result and dont mind if there are small changes between the analysis and the usage .