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

def delete_vm(name, datacenter, placement=None, power_off=False,
              service_instance=None):
    '''
    Deletes a virtual machine defined by name and placement

    name
        Name of the virtual machine

    datacenter
        Datacenter of the virtual machine

    placement
        Placement information of the virtual machine

    service_instance
        vCenter service instance for connection and configuration

    .. code-block:: bash

        salt '*' vsphere.delete_vm name=my_vm datacenter=my_datacenter

    '''
    results = {}
    schema = ESXVirtualMachineDeleteSchema.serialize()
    try:
        jsonschema.validate({'name': name,
                             'datacenter': datacenter,
                             'placement': placement},
                            schema)
    except jsonschema.exceptions.ValidationError as exc:
        raise InvalidConfigError(exc)
    (results, vm_ref) = _remove_vm(name,
                                   datacenter,
                                   service_instance=service_instance,
                                   placement=placement,
                                   power_off=power_off)
    salt.utils.vmware.delete_vm(vm_ref)
    results['deleted_vm'] = True
    return results