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

def _override_size(vm_):
    '''
    Apply any extra component overrides to VM from the cloud profile.
    '''
    vm_size = get_size(vm_)

    if 'cores' in vm_:
        vm_size['cores'] = vm_['cores']

    if 'ram' in vm_:
        vm_size['ram'] = vm_['ram']

    return vm_size