code: def extract_pool_attr(cls, req):
          
  
          attr = {}
          if 'id' in req:
              attr['id'] = int(req['id'])
          if 'name' in req:
              attr['name'] = req['name']
          if 'description' in req:
              attr['description'] = req['description']
          if 'default_type' in req:
              attr['default_type'] = req['default_type']
          if 'ipv4_default_prefix_length' in req:
              attr['ipv4_default_prefix_length'] = int(req['ipv4_default_prefix_length'])
          if 'ipv6_default_prefix_length' in req:
              attr['ipv6_default_prefix_length'] = int(req['ipv6_default_prefix_length'])
  
          return attr
docs: Extract pool attributes from arbitary dict.