class_docstr: Generic API client for OpenAPI client library builds.
  
  OpenAPI generic API client. This client handles the client-
  server communication, and is invariant across implementations. Specifics of
  the methods and models for each application are generated from the OpenAPI
  templates.
  
  :param configuration: .Configuration object for this client
  :param header_name: a header to pass when making calls to the API.
  :param header_value: a header value to pass when making calls to
      the API.
  :param cookie: a cookie to include in the header when making calls
      to the API
  :param pool_threads: The number of threads to use for async requests
      to the API. More threads means more concurrent API requests.
class_docstr_tok: ["Generic","API","client","for","OpenAPI","client","library","builds",".","OpenAPI","generic","API","client",".","This","client","handles","the","client-","server","communication",",","and","is","invariant","across","implementations",".","Specifics","of","the","methods","and","models","for","each","application","are","generated","from","the","OpenAPI","templates",".",":","param","configuration",":",".Configuration","object","for","this","client",":","param","header_name",":","a","header","to","pass","when","making","calls","to","the","API",".",":","param","header_value",":","a","header","value","to","pass","when","making","calls","to","the","API",".",":","param","cookie",":","a","cookie","to","include","in","the","header","when","making","calls","to","the","API",":","param","pool_threads",":","The","number","of","threads","to","use","for","async","requests","to","the","API",".","More","threads","means","more","concurrent","API","requests","."]
code: def __call_api(
      self,
      resource_path,
      method,
      path_params=None,
      query_params=None,
      header_params=None,
      body=None,
      post_params=None,
      files=None,
      response_types_map=None,
      auth_settings=None,
      _return_http_data_only=None,
      collection_formats=None,
      _preload_content=True,
      _request_timeout=None,
      _host=None,
      _request_auth=None,
  ):
      config = self.configuration
  
      # header parameters
      header_params = header_params or {}
      header_params.update(self.default_headers)
      if self.cookie:
          header_params["Cookie"] = self.cookie
      if header_params:
          header_params = self.sanitize_for_serialization(header_params)
          header_params = dict(
              self.parameters_to_tuples(
                  header_params, collection_formats
              )
          )
  
      # path parameters
      if path_params:
          path_params = self.sanitize_for_serialization(path_params)
          path_params = self.parameters_to_tuples(
              path_params, collection_formats
          )
          for k, v in path_params:
              # specified safe chars, encode everything
              resource_path = resource_path.replace(
                  "{%s}" % k,
                  quote(str(v), safe=config.safe_chars_for_path_param),
              )
  
      # post parameters
      if post_params or files:
          post_params = post_params if post_params else []
          post_params = self.sanitize_for_serialization(post_params)
          post_params = self.parameters_to_tuples(
              post_params, collection_formats
          )
          post_params.extend(self.files_parameters(files))
  
      # auth setting
      self.update_params_for_auth(
          header_params,
          query_params,
          auth_settings,
          resource_path,
          method,
          body,
          request_auth=_request_auth,
      )
  
      # body
      if body:
          body = self.sanitize_for_serialization(body)
  
      # request url
      if _host is None:
          url = self.configuration.host + resource_path
      else:
          # use server/host defined in path or operation instead
          url = _host + resource_path
  
      # query parameters
      if query_params:
          query_params = self.sanitize_for_serialization(query_params)
          url_query = self.parameters_to_url_query(
              query_params, collection_formats
          )
          url += "?" + url_query
  
      try:
          # perform request and return response
          response_data = self.request(
              method,
              url,
              query_params=query_params,
              headers=header_params,
              post_params=post_params,
              body=body,
              _preload_content=_preload_content,
              _request_timeout=_request_timeout,
          )
      except ApiException as e:
          if e.body:
              e.body = e.body.decode("utf-8")
          raise e
  
      self.last_response = response_data
  
      return_data = None  # assuming derialization is not needed
      # data needs deserialization or returns HTTP data (deserialized) only
      if _preload_content or _return_http_data_only:
          response_type = response_types_map.get(
              str(response_data.status), None
          )
  
          if response_type == "bytearray":
              response_data.data = response_data.data
          else:
              match = None
              content_type = response_data.getheader("content-type")
              if content_type is not None:
                  match = re.search(
                      r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type
                  )
              encoding = match.group(1) if match else "utf-8"
              response_data.data = response_data.data.decode(encoding)
  
          # deserialize response data
          if response_type == "bytearray":
              return_data = response_data.data
          elif response_type:
              return_data = self.deserialize(
                  response_data, response_type
              )
          else:
              return_data = None
  
      if _return_http_data_only:
          return return_data
      else:
          return ApiResponse(
              status_code=response_data.status,
              data=return_data,
              headers=response_data.getheaders(),
              raw_data=response_data.data,
          )
  
imports: import atexit
  import datetime
  from dateutil.parser import parse
  import json
  import mimetypes
  from multiprocessing.pool import ThreadPool
  import os
  import re
  import tempfile
  from urllib.parse import quote
  from lightly.openapi_generated.swagger_client.configuration import Configuration
  from lightly.openapi_generated.swagger_client.api_response import ApiResponse
  import lightly.openapi_generated.swagger_client.models
  from lightly.openapi_generated.swagger_client import rest
  from lightly.openapi_generated.swagger_client.exceptions import ApiValueError, ApiException
label_desc: Use image node_id 11 for calling the ApiClient obj's underlying member method code with example usage: obj.__call_api(resource_path, method, path_params, query_params, header_params, body, post_params, files, response_types_map, auth_settings, _return_http_data_only, collection_formats, _preload_content, _request_timeout, _host, _request_auth) and returns: return_data, ApiResponse