def __init__(self, **kwargs):
		"""
		Match inputs with vars
		"""
		super(CommonData, self).__init__(**kwargs)

		if self.validate() is False:
			raise TypeError("\n".join("'%s' <- %s" % (x, y) for x, y in six.iteritems(self.errors)))

		# Add extra vars from modules
		try:
			module_name = kwargs['module_name']
			fake_kwargs = dict(kwargs)

			# Add metavars: action / subactions
			self.action = fake_kwargs.pop('module_name')
			self.sub_action = None

			# Is a sub-action selected
			for x, y in six.iteritems(fake_kwargs):
				if x.startswith("module_"):
					self.sub_action = fake_kwargs.pop(x)
					break

			module_model = getattr(AppSettings.modules[module_name], "__model__", None)

			if module_model is not None:
				# Load module model to check parameters
				module_model(**fake_kwargs)

				# If not errors, set vars and values
				for x, v in six.iteritems(fake_kwargs):
					if x not in self.vars:
						setattr(self, x, v)
		except __HOLE__:
			# No module name available -> not an error. Class must be loading from another locations
			pass

	# ----------------------------------------------------------------------
dataset/ETHPy150Open cr0hn/enteletaor/enteletaor_lib/libs/core/structs.py/CommonData.__init__