human
Complete the below
def CreateCGate(name, latexname=None):

    ''''Use a lexical closure to make a controlled gate.'
    '''
assistant
#Here is the Python program you requested.
    if (not latexname):
        latexname = name
    onequbitgate = CreateOneQubitGate(name, latexname)
    def ControlledGate(ctrls, target):
        return CGate(tuple(ctrls), onequbitgate(target))
    return ControlledGate