human
Solve the following python programming problem given the following code:
def command(function) : 
    'Decorate a function as an IRC command' 
    def canonical(name) : 
        return name.strip ('_').replace ('_', '-') 
name = canonical (name.__name__) 
    register (name, function) 
    return function 

    
    

    Fix the buggy line: name = canonical (name.__name__)
assistant
#Here is Python code to fix the buggy line: name = canonical (name.

name = canonical (function.__name__)