<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def DomainFactory(domain_name, cmds):
 """Dynamically create Domain class and set it's methods."""

    klass = type(str(domain_name), (BaseDomain,), {})

    for c in cmds:
        command = get_command(domain_name, c['name'])
        setattr(klass, c['name'], classmethod(command))

    return klass