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","."]
docstr: Builds a JSON POST object.
  
  If obj is None, return None.
  If obj is str, int, long, float, bool, return directly.
  If obj is datetime.datetime, datetime.date
      convert to string in iso8601 format.
  If obj is list, sanitize each element in the list.
  If obj is dict, return the dict.
  If obj is OpenAPI model, return the properties dict.
  
  :param obj: The data to serialize.
  :return: The serialized form of data.
docstr_tok: ["Builds","a","JSON","POST","object",".","If","obj","is","None",",","return","None",".","If","obj","is","str",",","int",",","long",",","float",",","bool",",","return","directly",".","If","obj","is","datetime.datetime",",","datetime.date","convert","to","string","in","iso8601","format",".","If","obj","is","list",",","sanitize","each","element","in","the","list",".","If","obj","is","dict",",","return","the","dict",".","If","obj","is","OpenAPI","model",",","return","the","properties","dict",".",":","param","obj",":","The","data","to","serialize",".",":","return",":","The","serialized","form","of","data","."]
code: def sanitize_for_serialization(self, obj):
      """Builds a JSON POST object.
  
      If obj is None, return None.
      If obj is str, int, long, float, bool, return directly.
      If obj is datetime.datetime, datetime.date
          convert to string in iso8601 format.
      If obj is list, sanitize each element in the list.
      If obj is dict, return the dict.
      If obj is OpenAPI model, return the properties dict.
  
      :param obj: The data to serialize.
      :return: The serialized form of data.
      """
      if obj is None:
          return None
      elif isinstance(obj, self.PRIMITIVE_TYPES):
          return obj
      elif isinstance(obj, list):
          return [
              self.sanitize_for_serialization(sub_obj)
              for sub_obj in obj
          ]
      elif isinstance(obj, tuple):
          return tuple(
              self.sanitize_for_serialization(sub_obj)
              for sub_obj in obj
          )
      elif isinstance(obj, (datetime.datetime, datetime.date)):
          return obj.isoformat()
  
      if isinstance(obj, dict):
          obj_dict = obj
      else:
          # Convert model obj to dict except
          # attributes `openapi_types`, `attribute_map`
          # and attributes which value is not None.
          # Convert attribute name to json key in
          # model definition for request.
          obj_dict = obj.to_dict(by_alias=True)
  
      return {
          key: self.sanitize_for_serialization(val)
          for key, val in obj_dict.items()
      }
  
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 12 for calling the ApiClient obj's underlying member method code with example usage: obj.sanitize_for_serialization(obj) and returns: unknown, None, obj, unknown, tuple, obj