docs: def importCell (fileName, cellName, cellArgs = None, cellInstance = False):
      h.initnrn()
      varList = mechVarList()  # list of properties for all density mechanisms and point processes
      origGlob = getGlobals(list(varList['mechs'].keys())+list(varList['pointps'].keys()))
      origGlob['v_init'] = -65  # add by hand since won't be set unless load h.load_file('stdrun')
  
      if cellArgs is None: cellArgs = [] # Define as empty list if not otherwise defined
  
      ''' Import cell from HOC template or python file into framework format (dict of sections, with geom, topol, mechs, syns)'''
      if fileName.endswith('.hoc') or fileName.endswith('.tem'):
          h.load_file(fileName)
          if not cellInstance:
              if isinstance(cellArgs, dict):
                  cell = getattr(h, cellName)(**cellArgs)  # create cell using template, passing dict with args
              else:
                  cell = getattr(h, cellName)(*cellArgs) # create cell using template, passing list with args
          else:
              try:
                  cell = getattr(h, cellName)
              except:
                  cell = None
      elif fileName.endswith('.py'):
          filePath,fileNameOnly = os.path.split(fileName)  # split path from filename
          if filePath not in sys.path:  # add to path if not there (need to import module)
              sys.path.insert(0, filePath)
              removeFilePath = True
          else:
              removeFilePath = False
          moduleName = fileNameOnly.split('.py')[0]  # remove .py to obtain module name
          tempModule = importlib.import_module(moduleName)
          modulePointer = tempModule
          if isinstance(cellArgs, dict):
              cell = getattr(modulePointer, cellName)(**cellArgs) # create cell using template, passing dict with args
          else:
              cell = getattr(modulePointer, cellName)(*cellArgs)  # create cell using template, passing list with args
          if removeFilePath: sys.path.remove(filePath)
      else:
          print("File name should be either .hoc or .py file")
          return
  
      secDic, secListDic, synMechs, globs = getCellParams(cell, varList, origGlob)
      
      if fileName.endswith('.py'):
          _delete_module(moduleName)
          _delete_module('tempModule')
          del modulePointer
      elif fileName.endswith('.hoc'):
          for sec in h.allsec():
              try:
                  if h.cas()!=sec: sec.push()
                  h.delete_section()
                  h.pop_section()
              except:
                  pass
      h.initnrn()
  
      setGlobals(origGlob)  # restore original globals
  
      return secDic, secListDic, synMechs, globs