class_docstr: The base class for all the policies. For each different model, it should have a different policy class,
  like BertPolicy for Bert Model or OPTPolicy for OPT model.
  
  Shardformer has provided many built-in sharding policies for the mainstream models. You can use the
  built-in policies by setting `policy = None`, which is already the default argument for `Shardformer.optimize`.
  If you want to define your own policy, you can inherit from this class and overwrite the methods you want to modify.
docstr: Get layers that should be held in current stage. This method should be implemented by subclass.
  
  Returns:
      List[Module]: List of layers that should be hold in current stage
docstr_tok: ["Get","layers","that","should","be","held","in","current","stage",".","This","method","should","be","implemented","by","subclass",".","Returns",":","List","[","Module","]",":","List","of","layers","that","should","be","hold","in","current","stage"]
code: def get_held_layers(self) -> List[Module]:
      """Get layers that should be held in current stage. This method should be implemented by subclass.
  
      Returns:
          List[Module]: List of layers that should be hold in current stage
      """
      raise NotImplementedError
  
imports: from abc import ABC, abstractmethod
  from dataclasses import dataclass
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import numpy
  import torch.nn
  from torch import Tensor
  from torch.nn import Module
  from colossalai.pipeline.stage_manager import PipelineStageManager
  from ..layer.normalization import BaseLayerNorm
  from ..layer.parallel_module import ParallelModule
  from ..shard.shard_config import ShardConfig
label_desc: Use image node_id 11 for calling the Policy obj's underlying member method code with example usage: obj.get_held_layers() without return types