parameters: (self, ex: Union["Example", List["Example"]])
docstring: Every example that is created with :py:meth:`~vowpalwabbit.Workspace.parse`, :py:meth:`~vowpalwabbit.Workspace.example`, or :py:class:`~vowpalwabbit.Example`, should be passed to this method when you are finished with them.
  
          This will return them to the Workspace instance to be reused and it will update internal statistics. If you care about statistics of used Examples then you should only use them once before passing them to finish.
  
          Args:
              ex: example or examples to be finished
docstring_summary: Every example that is created with :py:meth:`~vowpalwabbit.Workspace.parse`, :py:meth:`~vowpalwabbit.Workspace.example`, or :py:class:`~vowpalwabbit.Example`, should be passed to this method when you are finished with them.
docstring_tokens: Every example that is created with : py : meth : ~vowpalwabbit . Workspace . parse : py : meth : ~vowpalwabbit . Workspace . example or : py : class : ~vowpalwabbit . Example should be passed to this method when you are finished with them .
function: def finish_example(self, ex: Union["Example", List["Example"]]) -> None:
          """Every example that is created with :py:meth:`~vowpalwabbit.Workspace.parse`, :py:meth:`~vowpalwabbit.Workspace.example`, or :py:class:`~vowpalwabbit.Example`, should be passed to this method when you are finished with them.
  
          This will return them to the Workspace instance to be reused and it will update internal statistics. If you care about statistics of used Examples then you should only use them once before passing them to finish.
  
          Args:
              ex: example or examples to be finished
          """
  
          if isinstance(ex, Example):
              if self._is_multiline():
                  raise ValueError(
                      "Learner is multiline but single example was passed to "
                      "finish_example. Use the list of examples instead?"
                  )
              if not ex.finished:
                  pylibvw.vw._finish_example(self, ex)
                  ex.finished = True
          elif isinstance(ex, list):
              if not self._is_multiline():
                  raise ValueError(
                      "Learner is singleline but multi example was passed to "
                      "finish_example. Use a single example instead?"
                  )
              if all(x.finished == False for x in ex):
                  pylibvw.vw._finish_example_multi_ex(self, ex)
                  for x in ex:
                      x.finished = True
function_tokens: def finish_example ( self , ex : Union [ "Example" , List [ "Example" ] ] ) -> None : if isinstance ( ex , Example ) : if self . _is_multiline ( ) : raise ValueError ( "Learner is multiline but single example was passed to " "finish_example. Use the list of examples instead?" ) if not ex . finished : pylibvw . vw . _finish_example ( self , ex ) ex . finished = True elif isinstance ( ex , list ) : if not self . _is_multiline ( ) : raise ValueError ( "Learner is singleline but multi example was passed to " "finish_example. Use a single example instead?" ) if all ( x . finished == False for x in ex ) : pylibvw . vw . _finish_example_multi_ex ( self , ex ) for x in ex : x . finished = True