def METHOD_NAME():  # pylint: disable=missing-docstring
  def get_prunable_weights_rnn_cell(cell):
    if cell.__class__ in cls._RNN_CELLS_WEIGHTS_MAP:
      return [getattr(cell, weight)
              for weight in cls._RNN_CELLS_WEIGHTS_MAP[cell.__class__]]
    if isinstance(cell, prunable_layer.PrunableLayer):
      return cell.get_prunable_weights()
    raise ValueError(cls._RNN_CELL_ERROR_MSG.format(
        layer.__class__, cell.__class__, cls._RNN_CELLS_WEIGHTS_MAP.keys()))
  prunable_weights = []
  for rnn_cell in cls._get_rnn_cells(layer):
    prunable_weights.extend(get_prunable_weights_rnn_cell(rnn_cell))
  return prunable_weights