def example_workflows():
 all_workflows = []
 for ep in workflow_entry_points():
  workflows = None
  try:
   workflows = ep.load()
  except pkg_resources.DistributionNotFound as ex:
   log.warning('Could not load workflows from %r (%r)', ep.dist, ex)
   continue
  except ImportError:
   log.error('Could not load workflows from %r', ep.dist, exc_info=True)
   continue
  except Exception:
   log.error('Could not load workflows from %r', ep.dist, exc_info=True)
   continue
  if isinstance(workflows, types.ModuleType):
   package = workflows
   workflows = list_schemes(workflows)
   workflows = [ExampleWorkflow(wf, package, ep.dist) for wf in workflows]
  elif isinstance(workflows, (types.FunctionType, types.MethodType)):
   try:
    workflows = example_workflows()
   except Exception as ex:
    log.error('A callable entry point (%r) raised an unexpected error.', ex, exc_info=True)
    continue
   workflows = [ExampleWorkflow(wf, package=None, distribution=ep.dist) for wf in workflows]
  all_workflows.extend(workflows)
 return all_workflows

def example_workflows ( ) : all_workflows = [ ] for ep in workflow_entry_points ( ) : workflows = None try : workflows = ep . load ( ) except pkg_resources . DistributionNotFound as ex : log . warning ( 'Could not load workflows from %r (%r)' , ep . dist , ex ) continue except ImportError : log . error ( 'Could not load workflows from %r' , ep . dist , exc_info = True ) continue except Exception : log . error ( 'Could not load workflows from %r' , ep . dist , exc_info = True ) continue if isinstance ( workflows , types . ModuleType ) : package = workflows workflows = list_schemes ( workflows ) workflows = [ ExampleWorkflow ( wf , package , ep . dist ) for wf in workflows ] elif isinstance ( workflows , ( types . FunctionType , types . MethodType ) ) : try : workflows = example_workflows ( ) except Exception as ex : log . error ( 'A callable entry point (%r) raised an unexpected error.' , ex , exc_info = True ) continue workflows = [ ExampleWorkflow ( wf , package = None , distribution = ep . dist ) for wf in workflows ] all_workflows . extend ( workflows ) return all_workflows
return all known example workflows .