def __new__(mcs, *args, **kwargs):
        """
        Handles the url_map generation based on the rules from the base classes
        Added to the class' own rules
        """
        name = args[0]
        bases = args[1]
        members = args[2].copy()

        rules = members.get('rules', [])
        for base in (base for base in bases if hasattr(base, 'rules')):
            for base_rule in base.rules:
                if not any(base_rule.rule == rule.rule or
                        set(base_rule.methods).intersection(set(rule.methods))
                            for rule in rules):
                    rules.append(base_rule)

        url_map = members.get('url_map', Map())
        for rule in rules:
            url_map.add(
                Rule(rule.rule, methods=rule.methods, endpoint=rule.endpoint)
            )

        members['rules'] = list(url_map.iter_rules())
        members['url_map'] = url_map

        return super(mcs, mcs).__new__(mcs, *(name, bases, members), **kwargs)
dataset/ETHPy150Open lvieirajr/mongorest/mongorest/resource.py/ResourceMeta.__new__/operator `and` -> `or`