code: def delete(workflow_id: str = None, workflow_version: str = None):
      
      if workflow_id is None and workflow_version is None:
          keys = DB.get_keys("workflow_definitions:*")
          DB.delete(*keys)
      elif workflow_id is not None and workflow_version is None:
          keys = DB.get_keys("workflow_definitions:{}:*".format(workflow_id))
          DB.delete(*keys)
      elif workflow_id is None and workflow_version is not None:
          keys = DB.get_keys("workflow_definitions:*:{}"
                             .format(workflow_version))
          DB.delete(*keys)
      else:
          name = "workflow_definitions:{}:{}".format(workflow_id,
                                                     workflow_version)
          DB.delete(name)
docs: Delete workflow definitions.
  
      Args:
          workflow_id (str, optional): Optional workflow identifier
          workflow_version (str, optional): Optional workflow identifier version
  
      If workflow_id and workflow_version are None, delete all workflow
      definitions.