

def _get_reference_image_from_s3(example, diff):
    example_path = relpath(splitext(example)[0], example_dir)
    ref_loc = join(diff, (example_path + '.png'))
    ref_url = join(S3_URL, ref_loc)
    response = requests.get(ref_url)
    if (not response.ok):
        info(("reference image %s doesn't exist" % ref_url))
        return None
    return response.content

dataset/ETHPy150Open bokeh/bokeh/tests/examples/test_examples.py _get_reference_image_from_s3/original