<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def config(self):
 """Get a Configuration object from the file contents."""

        conf = config.Configuration()
        for namespace in self.namespaces:

            if not hasattr(conf, namespace):

                if not self._strict:

                    continue

                raise exc.NamespaceNotRegistered(
                    "The namespace {0} is not registered.".format(namespace)
                )

            name = getattr(conf, namespace)

            for item, value in compat.iteritems(self.items(namespace)):

                if not hasattr(name, item):

                    if not self._strict:

                        continue

                    raise exc.OptionNotRegistered(
                        "The option {0} is not registered.".format(item)
                    )

                setattr(name, item, value)

        return conf