def metadata_process(self):
    resources = self.get('resources')
    if isinstance(resources, list):
        for (index, resource) in enumerate(resources):
            if (not isinstance(resource, Resource)):
                if (not isinstance(resource, dict)):
                    resource = {'name': f'resource{(index + 1)}'}
                resource = Resource(resource, basepath=self.__basepath, detector=self.__detector, hashing=self.__hashing)
                list.__setitem__(resources, index, resource)
            resource.onerror = self.__onerror
            resource.trusted = self.__trusted
            resource.package = self
        if (not isinstance(resources, helpers.ControlledList)):
            resources = helpers.ControlledList(resources)
            resources.__onchange__(self.metadata_process)
            dict.__setitem__(self, 'resources', resources)
def metadata_process(self):
    resources = self.get('resources')
    if isinstance(resources, list):
        for (index, resource) in enumerate(resources):
            if (not isinstance(resource, Resource)):
                if (not isinstance(resource, dict)):
                    resource = {'name': f'resource{(index + 1)}'}
                resource = Resource(resource, basepath=self.__basepath, detector=self.__detector, hashing=self.__hashing)
                list.__setitem__(resources, index, resource)
            resource.onerror = self.__onerror
            resource.trusted = self.__trusted
            resource.package = self
        if (not isinstance(resources, helpers.ControlledList)):
            resources = helpers.ControlledList(resources)
            resources.__onchange__(self.metadata_process)
            dict.__setitem__(self, 'resources', resources)