def METHOD_NAME(
    self, table_type: str, table_name: str, schema_name: str, inspector: Inspector
) -> Optional[str]:
    if table_type not in {TableType.View, TableType.MaterializedView}:
        return None
    definition_fn = inspector.METHOD_NAME
    if table_type == TableType.MaterializedView:
        definition_fn = inspector.get_mview_definition
    try:
        view_definition = definition_fn(table_name, schema_name)
        view_definition = "" if view_definition is None else str(view_definition)
        return view_definition
    except NotImplementedError:
        logger.warning("View definition not implemented")
    except Exception as exc:
        logger.debug(traceback.format_exc())
        logger.warning(f"Failed to fetch view definition for {table_name}: {exc}")
    return None