@rbac(('owner', 'user'))
    def set_metadata(self, traitpath, metaname, value):
        """Set the metadata associated with the trait found using traitpath."""
        if metaname in ('iotype',):
            self.raise_exception("Can't set %s on %s, read-only"
                                 % (metaname, traitpath), TypeError)
        self.get_metadata(traitpath)[metaname] = value
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/container.py/Container.set_metadata/original