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: Get parameters as list of tuples, formatting collections.
  
  :param params: Parameters as dict or list of two-tuples
  :param dict collection_formats: Parameter collection formats
  :return: Parameters as list of tuples, collections formatted
docstr_tok: ["Get","parameters","as","list","of","tuples",",","formatting","collections",".",":","param","params",":","Parameters","as","dict","or","list","of","two-tuples",":","param","dict","collection_formats",":","Parameter","collection","formats",":","return",":","Parameters","as","list","of","tuples",",","collections","formatted"]
code: def parameters_to_tuples(self, params, collection_formats):
      """Get parameters as list of tuples, formatting collections.
  
      :param params: Parameters as dict or list of two-tuples
      :param dict collection_formats: Parameter collection formats
      :return: Parameters as list of tuples, collections formatted
      """
      new_params = []
      if collection_formats is None:
          collection_formats = {}
      for k, v in (
          params.items() if isinstance(params, dict) else params
      ):  # noqa: E501
          if k in collection_formats:
              collection_format = collection_formats[k]
              if collection_format == "multi":
                  new_params.extend((k, value) for value in v)
              else:
                  if collection_format == "ssv":
                      delimiter = " "
                  elif collection_format == "tsv":
                      delimiter = "\t"
                  elif collection_format == "pipes":
                      delimiter = "|"
                  else:  # csv is the default
                      delimiter = ","
                  new_params.append(
                      (k, delimiter.join(str(value) for value in v))
                  )
          else:
              new_params.append((k, v))
      return new_params
  
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 17 for calling the ApiClient obj's underlying member method code with example usage: obj.parameters_to_tuples(params, collection_formats) and returns: new_params