code: def _get_appoptics(options):
      '''
      Return an appoptics connection object.
      '''
      conn = appoptics_metrics.connect(
          options.get('api_token'),
          sanitizer=appoptics_metrics.sanitize_metric_name,
          hostname=options.get('api_url'))
      log.info("Connected to appoptics.")
      return conf _get_appoptics(options):
      '''
      Return an appoptics connection object.
      '''
      conn = appoptics_metrics.connect(
          options.get('api_token'),
          sanitizer=appoptics_metrics.sanitize_metric_name,
          hostname=options.get('api_url'))
      log.info("Connected to appoptics.")
      return conn
docs: Return an appoptics connection object.