code: def read(
      filename, force_ext=None, file_format=None, progress_bar=False
  ):
      """Read any file type supported by ``vtk`` or ``meshio``.
  
      Automatically determines the correct reader to use then wraps the
      corresponding mesh as a pyvista object.  Attempts native ``vtk``
      readers first then tries to use ``meshio``.
  
      See :func:`pyvista.get_reader` for list of formats supported.
  
      .. note::
         See https://github.com/nschloe/meshio for formats supported by
         ``meshio``. Be sure to install ``meshio`` with ``pip install
         meshio`` if you wish to use it.
  
      Parameters
      ----------
      filename : str
          The string path to the file to read. If a list of files is
          given, a :class:`pyvista.MultiBlock` dataset is returned with
          each file being a separate block in the dataset.
  
      force_ext : str, optional
          If specified, the reader will be chosen by an extension which
          is different to its actual extension. For example, ``'.vts'``,
          ``'.vtu'``.
  
      file_format : str, optional
          Format of file to read with meshio.
  
      progress_bar : bool, default: False
          Optionally show a progress bar. Ignored when using ``meshio``.
  
      Returns
      -------
      pyvista.DataSet
          Wrapped PyVista dataset.
  
      Examples
      --------
      Load an example mesh.
  
      >>> import pyvista as pv
      >>> from pyvista import examples
      >>> mesh = pv.read(examples.antfile)
      >>> mesh.plot(cpos='xz')
  
      Load a vtk file.
  
      >>> mesh = pv.read('my_mesh.vtk')  # doctest:+SKIP
  
      Load a meshio file.
  
      >>> mesh = pv.read("mesh.obj")  # doctest:+SKIP
      """
      if file_format is not None and force_ext is not None:
          raise ValueError(
              "Only one of `file_format` and `force_ext` may be specified."
          )
  
      if isinstance(filename, (list, tuple)):
          multi = pyvista.MultiBlock()
          for each in filename:
              if isinstance(each, (str, pathlib.Path)):
                  name = os.path.basename(str(each))
              else:
                  name = None
              multi.append(read(each, file_format=file_format), name)
          return multi
      filename = os.path.abspath(os.path.expanduser(str(filename)))
      if not os.path.isfile(filename):
          raise FileNotFoundError(f"File ({filename}) not found")
  
      # Read file using meshio.read if file_format is present
      if file_format:
          return read_meshio(filename, file_format)
  
      ext = _get_ext_force(filename, force_ext)
      if ext in [".e", ".exo"]:
          return read_exodus(filename)
  
      try:
          reader = pyvista.get_reader(filename, force_ext)
      except ValueError:
          # if using force_ext, we are explicitly only using vtk readers
          if force_ext is not None:
              raise OSError(
                  "This file was not able to be automatically read by pvista."
              )
          from meshio._exceptions import ReadError
  
          try:
              return read_meshio(filename)
          except ReadError:
              raise OSError(
                  "This file was not able to be automatically read by pyvista."
              )
      else:
          observer = Observer()
          observer.observe(reader.reader)
          if progress_bar:
              reader.show_progress()
          mesh = reader.read()
          if observer.has_event_occurred():
              warnings.warn(
                  f"The VTK reader `{reader.reader.GetClassName()}` in pyvista reader `{reader}` raised an error"
                  "while reading the file.\n"
                  f'\t"{observer.get_message()}"'
              )
          return mesh
  
imports: import os
  import pathlib
  import warnings
  import numpy
  import pyvista
  from pyvista.core import _vtk_core
  from pyvista.core.errors import PyVistaDeprecationWarning
  from .observers import Observer
label_desc: Use image node_id 5 for calling a global function with example usage: read(filename, force_ext, file_format, progress_bar) and returns: multi, read_meshio, read_exodus, mesh, read_meshio