<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_lxc(name, template='ubuntu', service=None):
 """Factory method for the generic LXC"""

    service = service or LXCService
    service.create(name, template=template)
    meta = LXCMeta(initial=dict(type='LXC'))
    lxc = LXC.with_meta(name, service, meta, save=True)
    return lxc