

def import_coordinator_root(coordinator, coordinator_definition_root, metadata=None):
    xslt_definition_fh = open(('%(xslt_dir)s/coordinator.xslt' % {
        'xslt_dir': os.path.join(conf.DEFINITION_XSLT_DIR.get(), 'coordinators'),
    }))
    tag = etree.QName(coordinator_definition_root.tag)
    schema_version = coordinator.namespace
    if (schema_version not in OOZIE_NAMESPACES):
        raise RuntimeError((_('Tag with namespace %(namespace)s is not valid. Please use one of the following namespaces: %(namespaces)s') % {
            'namespace': coordinator_definition_root.tag,
            'namespaces': ', '.join(OOZIE_NAMESPACES),
        }))
    xslt = etree.parse(xslt_definition_fh)
    xslt_definition_fh.close()
    transform = etree.XSLT(xslt)
    transformed_root = transform(coordinator_definition_root)
    objects = serializers.deserialize('xml', etree.tostring(transformed_root))
    _set_coordinator_properties(coordinator, coordinator_definition_root, schema_version)
    _set_controls(coordinator, coordinator_definition_root, schema_version)
    _reconcile_datasets(coordinator, objects, coordinator_definition_root, schema_version)
    _set_properties(coordinator, coordinator_definition_root, schema_version)
    if metadata:
        _process_metadata(coordinator, metadata)
    coordinator.schema_version = schema_version
    coordinator.save()

dataset/ETHPy150Open cloudera/hue/apps/oozie/src/oozie/importlib/coordinators.py import_coordinator_root/VarMisuse@62/112 `tag`->`coordinator`