'Return module initialized from the WorkflowStep object `step`.'

def from_workflow_step(self, trans, repository_id, changeset_revision, tools_metadata, step):

    type = step.type
    module_method_kwds = dict()
    if (type == 'tool'):
        module_method_kwds['repository_id'] = repository_id
        module_method_kwds['changeset_revision'] = changeset_revision
        module_method_kwds['tools_metadata'] = tools_metadata
    return self.module_types[type].from_workflow_step(trans, step, **module_method_kwds)
