class_docstr: Base class for all pruners which use a PruningMethod (implemented in
class_docstr_tok: ["Base","class","for","all","pruners","which","use","a","PruningMethod","(","implemented","in"]
docstr: Prepares the model for pruning.
  
  Args:
      inplace (:obj:`bool`): If ``True``, model transformations are carried out in-place and
          the original module is mutated, otherwise a copy of the model is mutated and returned.
docstr_tok: ["Prepares","the","model","for","pruning",".","Args",":","inplace","(",":","obj",":","`","bool","`",")",":","If","``","True","``",",","model","transformations","are","carried","out","in-place","and","the","original","module","is","mutated",",","otherwise","a","copy","of","the","model","is","mutated","and","returned","."]
code: def prepare(self, inplace: bool = False) -> _torch.nn.Module:
      """
      Prepares the model for pruning.
  
      Args:
          inplace (:obj:`bool`): If ``True``, model transformations are carried out in-place and
              the original module is mutated, otherwise a copy of the model is mutated and returned.
      """
      return _copy.deepcopy(self._model) if not inplace else self._model
  
file_path: coremltools/coremltools/optimize/torch/pruning/_base_pruner.py
imports: import copy
  import logging
  from typing import Optional
  from typing import Tuple
  import torch
  from coremltools.optimize.torch._utils.torch_utils import get_eval_model
  from coremltools.optimize.torch.base_model_optimizer import BaseModelOptimizer
  from coremltools.optimize.torch.base_model_optimizer import _Report
  from coremltools.optimize.torch.optimization_config import OptimizationConfig
  from coremltools.optimize.torch.pruning._utils import get_global_sparsity_summaries
label_desc: Use image node_id 3 for calling the BasePrunerWithPruningMethod obj's underlying member method code with example usage: obj.prepare(inplace) and returns: unknown