code: def import_smesh(file):
      
      imported_elements = []
      if os.path.isfile(file):
          imported_elements.append(exch.import_surf_mesh(file))
      elif os.path.isdir(file):
          files = sorted([os.path.join(file, f) for f in os.listdir(file)])
          for f in files:
              imported_elements.append(exch.import_surf_mesh(f))
      else:
          raise exch.GeomdlException("Input is not a file or a directory")
      return imported_elements
docs: Generates NURBS surface(s) from surface mesh (smesh) file(s).
  
      *smesh* files are some text files which contain a set of NURBS surfaces. Each file in the set corresponds to one
      NURBS surface. Most of the time, you receive multiple *smesh* files corresponding to an complete object composed of
      several NURBS surfaces. The files have the extensions of ``txt`` or ``dat`` and they are named as
  
      * ``smesh.X.Y.txt``
      * ``smesh.X.dat``
  
      where *X* and *Y* correspond to some integer value which defines the set the surface belongs to and part number of
      the surface inside the complete object.
  
      :param file: path to a directory containing mesh files or a single mesh file
      :type file: str
      :return: list of NURBS surfaces
      :rtype: list
      :raises GeomdlException: an error occurred reading the file