code: def check_error_raises(type, argument):
      """
      This function is used to check whether the exception is raised or not.
  
      Parameter
      ---------
  
      type: Type of Error raised
      argument: lambda function with no parameters.
  
      Example:
      >>> ex = ["|a", "|b"]
      >>> vw = vowpalwabbit.Workspace(quiet=True)
      >>> check_error_raises(TypeError, lambda: vw.learn(ex))
  
      """
      with pytest.raises(type) as error:
          argument()
  
imports: import os
  from pathlib import Path
  import vowpalwabbit
  from vowpalwabbit import Workspace
  import pytest
  import warnings
  import filecmp
label_desc: Use image node_id 44 for calling a global function with example usage: check_error_raises(type, argument) without return types