def unpack_row(row, cols):
  """Convert a suds row object into serializable format.

  Transform a row of results objects received from the DFP API's
  Publisher Query Language Service into a Python dict.

  Args:
    row: A row of suds object which include an array of values.
    cols: An array of strings representing the column names.

  Returns:
    dict A serializable Python dict.
  """
  try:
    # throws AttributeError is 'values' does not exist in row object
    values = map(lambda value: value['value'], row['values'])
    return dict(zip(cols, values))
  except AttributeError:
    return {}