code: def trace_set_buffer_capacity(self, size):
          
          cmd = enums.JLinkTraceCommand.SET_CAPACITY
          data = ctypes.c_uint32(size)
          res = self._dll.JLINKARM_TRACE_Control(cmd, ctypes.byref(data))
          if (res == 1):
              raise errors.JLinkException('Failed to set trace buffer size.')
          return None
docs: Sets the capacity for the trace buffer.
  
          Args:
            self (JLink): the ``JLink`` instance.
            size (int): the new capacity for the trace buffer.
  
          Returns:
            ``None``