class_docstr: A dict of dicts to store analyses
  
  Parameters
  ----------
  top_analysis: :class:`Analysis`
      The Analysis at the highest scale level containing all landmarks
      
  Notes
  -----
  The outer dict represents the scales and
  the inner dicts at scale level are indexed by the unique
  self-generated Analysis ids.
class_docstr_tok: ["A","dict","of","dicts","to","store","analyses","Parameters","--","--","--","--","--","top_analysis",":",":","class",":","`","Analysis","`","The","Analysis","at","the","highest","scale","level","containing","all","landmarks","Notes","--","--","-","The","outer","dict","represents","the","scales","and","the","inner","dicts","at","scale","level","are","indexed","by","the","unique","self-generated","Analysis","ids","."]
docstr: Removes analysis and (recursively) children
  
  return: list of analysis ids removed including this one
docstr_tok: ["Removes","analysis","and","(","recursively",")","children","return",":","list","of","analysis","ids","removed","including","this","one"]
code: def remove_analysis(self, analysis_id):
      """Removes analysis and (recursively) children
  
      return: list of analysis ids removed including this one
      """
      analysis = self.get_analysis(analysis_id)
      if analysis is None:
          return []
      removed_ids = [analysis.id]
      child_list = list(self._children[analysis.id])
      for id in child_list:
          removed_ids.append(id)
          removed_ids.extend(self.remove_analysis(id))
      # remove from the child tree
      del self._children[analysis.id]
      # and from the scale index lookup
      del self._scale_index[analysis.id]
      # remove the parent's children reference if any
      if not analysis.parent_id == self._null_id:
          self._children[analysis.parent_id].remove(analysis.id)
      # del the analysis reference in the analysis contaner
      del self._container[analysis.scale_id][analysis.id]
      print(f"removed: {analysis_id}")
      return removed_ids
  
file_path: nptsne/src/nptsne/hsne_analysis/analysis_model.py
imports: from ..libs._nptsne._hsne_analysis import EmbedderType, Analysis
  import numpy
label_desc: Use image node_id 5 for calling the AnalysisContainer obj's underlying member method code with example usage: obj.remove_analysis(analysis_id) and returns: removed_ids, list