code: def fetch(self, view="list"):
      data = self.fetched_data
  
      if view == "dataframe":
          result = data.to_df()
      else:
          result = data.get_records_raw()
  
      return {"success": True, "result": result}
  
imports: import inspect
  import re
  from mindsdb_sql import parse_sql
  from mindsdb_sql.parser.ast import Identifier
  from mindsdb_sql.planner.steps import ApplyTimeseriesPredictorStep, ApplyPredictorRowStep, ApplyPredictorStep
  from mindsdb_sql.exceptions import PlanningException
  from mindsdb_sql.render.sqlalchemy_render import SqlalchemyRender
  from mindsdb_sql.planner import query_planner
  from mindsdb_sql.planner.utils import query_traversal
  from mindsdb.api.executor.utilities.sql import query_df
  from mindsdb.interfaces.model.functions import get_model_record
  from mindsdb.api.executor.exceptions import UnknownError, LogicError
  import mindsdb.utilities.profiler
  from mindsdb.utilities.fs import create_process_mark, delete_process_mark
  from .None import steps
  from .result_set import ResultSet, Column
  from .steps.base import BaseStepCall
label_desc: Use image node_id 4 for calling the SQLQuery obj's underlying member method code with example usage: obj.fetch(view) and returns: dict