def get_import_prefixes_from_env(env):
 prefixes = [None]
 currmodule = env.ref_context.get('py:module')
 if currmodule:
  prefixes.insert(0, currmodule)
 currclass = env.ref_context.get('py:class')
 if currclass:
  if currmodule:
   prefixes.insert(0, ((currmodule + '.') + currclass))
  else:
   prefixes.insert(0, currclass)
 return prefixes

def get_import_prefixes_from_env ( env ) : prefixes = [ None ] currmodule = env . ref_context . get ( 'py:module' ) if currmodule : prefixes . insert ( 0 , currmodule ) currclass = env . ref_context . get ( 'py:class' ) if currclass : if currmodule : prefixes . insert ( 0 , ( ( currmodule + '.' ) + currclass ) ) else : prefixes . insert ( 0 , currclass ) return prefixes
obtain current python import prefixes from document .