code: def pckw02(handle, classid, frname, first, last, segid, intlen, n, polydg, cdata, btime):
      
      handle = ctypes.c_int(handle)
      classid = ctypes.c_int(classid)
      frame = stypes.stringToCharP(frname)
      first = ctypes.c_double(first)
      last = ctypes.c_double(last)
      segid = stypes.stringToCharP(segid)
      intlen = ctypes.c_double(intlen)
      n = ctypes.c_int(n)
      polydg = ctypes.c_int(polydg)
      cdata = stypes.toDoubleVector(cdata)
      btime = ctypes.c_double(btime)
      libspice.pckw02_c(handle, classid, frame, first, last, segid, intlen, n, polydg, cdata, btime)
docs: Write a type 2 segment to a PCK binary file given the file handle,
      frame class ID, base frame, time range covered by the segment, and
      the Chebyshev polynomial coefficients.
      
      https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/pckw02_c.html
      
      :param handle: Handle of binary PCK file open for writing.
      :type handle: int
      :param classid: Frame class ID of body-fixed frame.
      :type classid: int
      :param frname: Name of base reference frame.
      :type frname: str
      :param first: Start time of interval covered by segment. 
      :type first: float
      :param last: End time of interval covered by segment.
      :type last: float
      :param segid: Segment identifier.
      :type segid: str
      :param intlen: Length of time covered by logical record.
      :type intlen: float
      :param n: Number of logical records in segment.
      :type n: int
      :param polydg: Chebyshev polynomial degree. 
      :type polydg: int
      :param cdata: Array of Chebyshev coefficients.
      :type cdata: N-Element Array of floats
      :param btime: Begin time of first logical record.
      :type btime: float