'Find and return the decorated method named like cmd
:param cmd: the command to get, a string, if not found raises
UnknownCommandError'

def get_command(self, cmd):

    cmd = cmd.lower().replace('-', '_')
    f = getattr(self, cmd, None)
    if (f is None):
        raise UnknownCommandError(cmd)
    if (not hasattr(f, 'publicly_accessible')):
        raise UnknownCommandError(cmd)
    return f
