code: def expanded(self, table_schema_id: int) -> FlaskResponse:
      payload = json.loads(request.form["expanded"])
      (
          db.session.query(TableSchema)
          .filter_by(id=table_schema_id)
          .update({"expanded": payload})
      )
      db.session.commit()
      response = json.dumps(
          {"id": table_schema_id, "expanded": payload}
      )
      return json_success(response)
  
imports: import logging
  import simplejson
  from flask import redirect, request, Response
  from flask_appbuilder import expose
  from flask_appbuilder.models.sqla.interface import SQLAInterface
  from flask_appbuilder.security.decorators import has_access, has_access_api
  from flask_babel import gettext
  from sqlalchemy import and_
  from superset import db
  from superset.constants import MODEL_VIEW_RW_METHOD_PERMISSION_MAP, RouteMethod
  from superset.models.sql_lab import Query, SavedQuery, TableSchema, TabState
  from superset.superset_typing import FlaskResponse
  from superset.utils import core
  from superset.utils.core import get_user_id
  from superset.views.base import BaseSupersetView, DeleteMixin, json_success, SupersetModelView
label_desc: Use image node_id 3 for calling the TableSchemaView obj's underlying member method code with example usage: obj.expanded(table_schema_id) and returns: json_success