def get_policy_index(req_headers, res_headers):
 header = 'X-Backend-Storage-Policy-Index'
 policy_index = res_headers.get(header, req_headers.get(header))
 return (str(policy_index) if (policy_index is not None) else None)

def get_policy_index ( req_headers , res_headers ) : header = 'X-Backend-Storage-Policy-Index' policy_index = res_headers . get ( header , req_headers . get ( header ) ) return ( str ( policy_index ) if ( policy_index is not None ) else None )
returns the appropriate index of the storage policy for the request from a proxy server .