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

def get_vm_by_name(content, name, regex=False):
    '''
    Get a VM by its name
    '''
    return get_object_by_name(content, vim.VirtualMachine, name, regex)