def check_status(results):
    """Make sure list of results succeeded

    Parameters
    ----------
    results : list of dicts, or dict
        JSON from an API call parsed as a dictionary
    """
    results.raise_for_status()
    results = results.json()

    def check_one_status(result):
        """Do the check on an individual result"""
        if result['status'] != 'SUCCESS':
            raise RuntimeError(str(result['object']))
    if isinstance(results, list):
        for result in results:
            check_one_status(result)
    else:
        check_one_status(results)
    return results