def extract_provider_location(provider_location, key):
 if (not provider_location):
  return None
 kvps = provider_location.split('|')
 for kvp in kvps:
  fields = kvp.split('^')
  if ((len(fields) == 2) and (fields[0] == key)):
   return fields[1]

def extract_provider_location ( provider_location , key ) : if ( not provider_location ) : return None kvps = provider_location . split ( '|' ) for kvp in kvps : fields = kvp . split ( '^' ) if ( ( len ( fields ) == 2 ) and ( fields [ 0 ] == key ) ) : return fields [ 1 ]
extracts value of the specified field from provider_location string .