code: def cached_table_counts(self):
      if self._cached_table_counts is not None:
          return self._cached_table_counts
      # Maybe use self.ds.inspect_data to populate cached_table_counts
      if self.ds.inspect_data and self.ds.inspect_data.get(self.name):
          self._cached_table_counts = {
              key: value["count"]
              for key, value in self.ds.inspect_data[self.name][
                  "tables"
              ].items()
          }
      return self._cached_table_counts
  
imports: import asyncio
  from collections import namedtuple
  from pathlib import Path
  import hashlib
  import janus
  import queue
  import sys
  import threading
  import uuid
  from .tracer import trace
  from .utils import detect_fts, detect_primary_keys, detect_spatialite, get_all_foreign_keys, get_outbound_foreign_keys, sqlite_timelimit, sqlite3, table_columns, table_column_details
  from .inspect import inspect_hash
label_desc: Use image node_id 2 for calling the Database obj's underlying member method code with example usage: obj.cached_table_counts() and returns: self, self