def is_distributed_router(router):
    """Return True if router to be handled is distributed."""
    try:
        # See if router is a DB object first
        requested_router_type = router.extra_attributes.distributed
    except __HOLE__:
        # if not, try to see if it is a request body
        requested_router_type = router.get('distributed')
    if validators.is_attr_set(requested_router_type):
        return requested_router_type
    return cfg.CONF.router_distributed
dataset/ETHPy150Open openstack/neutron/neutron/db/l3_dvr_db.py/is_distributed_router