docstr: Iterates over SqlAlchemy's metadata, looking for EncryptedType
  columns along the way. Builds up a dict of
  table_name -> dict of col_name: enc type instance
  :return:
docstr_tok: ["Iterates","over","SqlAlchemy","'s","metadata",",","looking","for","EncryptedType","columns","along","the","way",".","Builds","up","a","dict","of","table_name","-",">","dict","of","col_name",":","enc","type","instance",":","return",":"]
code: def discover_encrypted_fields(
      self,
  ) -> dict[str, dict[str, EncryptedType]]:
      """
      Iterates over SqlAlchemy's metadata, looking for EncryptedType
      columns along the way. Builds up a dict of
      table_name -> dict of col_name: enc type instance
      :return:
      """
      meta_info: dict[str, Any] = {}
  
      for table_name, table in self._db.metadata.tables.items():
          for col_name, col in table.columns.items():
              if isinstance(col.type, EncryptedType):
                  cols = meta_info.get(table_name, {})
                  cols[col_name] = col.type
                  meta_info[table_name] = cols
  
      return meta_info
  
imports: import logging
  from abc import ABC, abstractmethod
  from typing import Any, Optional
  from flask import Flask
  from flask_babel import lazy_gettext
  from sqlalchemy import text, TypeDecorator
  from sqlalchemy.engine import Connection, Dialect, Row
  from sqlalchemy_utils import EncryptedType
label_desc: Use image node_id 2 for calling the SecretsMigrator obj's underlying member method code with example usage: obj.discover_encrypted_fields() and returns: meta_info