code: def extract_prefix_attr(cls, req):
          
  
          # TODO: add more?
          attr = {}
          if 'id' in req:
              attr['id'] = int(req['id'])
          if 'prefix' in req:
              attr['prefix'] = req['prefix']
          if 'pool' in req:
              attr['pool_id'] = int(req['pool'])
          if 'node' in req:
              attr['node'] = req['node']
          if 'type' in req:
              attr['type'] = req['type']
          if 'country' in req:
              attr['country'] = req['country']
          if 'indent' in req:
              attr['indent'] = req['indent']
  
          return attr
docs: Extract prefix attributes from arbitary dict.