code: def export(
      self,
      sql: "Union[str, Selectable]",
      file: StrOrBytesPath,
      format: str = "csv",  # noqa: A002
      progress=noop,
  ) -> None:
      con = self.engine.connect()
      if format == "csv":
          con = con.execution_options(
              stream_results=True
          )  # use server-side cursors
  
      with con:
          serializer = Serializer(sql, con)
          return serializer.export(
              file, format=format, progress=progress
          )
  
imports: import os
  from contextlib import contextmanager
  from dataclasses import dataclass
  from tempfile import NamedTemporaryFile
  from typing import TYPE_CHECKING, Any, Callable, Dict, Iterator, Optional, Union
  from sqlalchemy import create_engine
  from sqlalchemy.engine import make_url
  from sqlalchemy.exc import NoSuchModuleError
  from dvc import env
  from dvc.exceptions import DvcException
  from dvc.log import logger
  from dvc.types import StrOrBytesPath
  from dvc.utils import env2bool
label_desc: Use image node_id 2 for calling the Client obj's underlying member method code with example usage: obj.export(sql, file, format, progress) and returns: serializer