def METHOD_NAME(name, parent, case_type):
    if parent:
        indices = [CaseIndex(
            parent,
            identifier='parent',
            relationship=CASE_INDEX_CHILD,
            related_type=parent.attrs['case_type'],
        )]
    else:
        indices = []
    return CaseStructure(
        case_id=uuid.uuid4().hex,
        attrs={
            "case_type": case_type,
            "create": True,
            "update": {"name": name},
        },
        indices=indices,
        walk_related=True,
    )