def sample(config, samples):
  """Upload a series of samples.  Each sample has keys 'image' and 'label'. 
  Images are ignored if the rate limit is hit."""
  url = get_api_path('sample.json')
  multiple_files = []
  images = [s['image'] for s in samples]
  labels = [s['label'] for s in samples]
  for image in images:
    multiple_files.append(('images', (image, open(image, 'rb'), 'image/png')))
  headers=get_headers(no_content_type=True)
  headers["config"]= json.dumps(config, cls=HCEncoder)
  headers["labels"]= json.dumps(labels)
  print("With headers", headers)

  try:
      r = requests.post(url, files=multiple_files, headers=headers, timeout=30)
      return r.text
  except requests.exceptions.RequestException:
      e = sys.exc_info()[0]
      print("Error while calling hyperchamber - ", e)
      return None
Upload a series of samples.  Each sample has keys 'image' and 'label'. 
  Images are ignored if the rate limit is hit.