def METHOD_NAME(
    self,
    name: str,
    source_file: Path | str | None = None,
    subject_id: str | None = None,
    childname: str | None = None,
    create_ok: bool = True,
):
    hierarchy: list[pe.Workflow] = [self.ctx.workflow]
    def require_workflow(child_name):
        workflow = hierarchy[-1]
        child = workflow.get_node(child_name)
        if child is None:
            if create_ok is False:
                raise ValueError()
            child = pe.Workflow(name=child_name)
            workflow.add_nodes([child])
        assert isinstance(child, pe.Workflow)
        hierarchy.append(child)
    require_workflow(name)
    single_subject_wf_name = self._single_subject_wf_name(
        source_file=source_file, subject_id=subject_id
    )
    if single_subject_wf_name is not None:
        require_workflow(single_subject_wf_name)
    if source_file is not None:
        if self.ctx.database.tagval(source_file, "datatype") == "func":
            require_workflow(self._bold_wf_name(source_file))
    if childname is not None:
        require_workflow(childname)
    return hierarchy