<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def build_clonespec(config_spec, object_ref, reloc_spec, template):
    '''
    Returns the clone spec
    '''
    if reloc_spec.diskMoveType == QUICK_LINKED_CLONE:
        return vim.vm.CloneSpec(
            template=template,
            location=reloc_spec,
            config=config_spec,
            snapshot=object_ref.snapshot.currentSnapshot
        )

    return vim.vm.CloneSpec(
        template=template,
        location=reloc_spec,
        config=config_spec
    )