def METHOD_NAME(task_parser):
    workflow_start_event = task_parser.xpath('./bpmn:startEvent')
    workflow_end_event = task_parser.xpath('./bpmn:endEvent')
    if len(workflow_start_event) != 1:
        raise ValidationException(
            f'Exactly one start event is required in a SubWorkflow Task; found {len(workflow_start_event)}.',
            node=task_parser.node,
            file_name=task_parser.filename)
    if len(workflow_end_event) == 0:
        raise ValidationException('A SubWorkflow Must contain an End event',
            node=task_parser.node,
            file_name=task_parser.filename)
    task_parser.process_parser.parser.create_parser(
        task_parser.node,
        filename=task_parser.filename,
        lane=task_parser.lane
    )
    spec_id = task_parser.node.get('id')
    # This parser makes me want to cry
    spec_parser = task_parser.process_parser.parser.process_parsers[spec_id]
    spec_parser.inherited_data_objects.update(task_parser.process_parser.spec.data_objects)
    return spec_id