def write_k_record(self, *args):
        """
        Write a K record::

            writer.write_k_record_extensions([
                ('FXA', 3), ('SIU', 2), ('ENL', 3),
            ])

            writer.write_k_record(datetime.time(2, 3, 4), ['023', 13, 2])

            # -> J030810FXA1112SIU1315ENL
            # -> K02030402313002

        :param time: UTC time of the k record (default:
            :meth:`~datetime.datetime.utcnow`)
        :param extensions: a list of extension values according to previous
            declaration through
            :meth:`~aerofiles.igc.Writer.write_k_record_extensions`
        """

        num_args = len(args)
        if num_args not in (1, 2):
            raise ValueError('Invalid number of parameters received')

        if num_args == 1:
            extensions = args[0]
            time = None
        else:
            time, extensions = args

        if time is None:
            time = datetime.datetime.utcnow()

        record = self.format_time(time)

        if not (isinstance(extensions, list) and
                isinstance(self.k_record_extensions, list)):
            raise ValueError('Invalid extensions list')

        if len(extensions) != len(self.k_record_extensions):
            raise ValueError(
                'Number of extensions does not match declaration')

        for type_length, value in zip(self.k_record_extensions, extensions):
            length = type_length[1]

            if isinstance(value, (int, float)):
                value = ('%0' + str(length) + 'd') % value

            if len(value) != length:
                raise ValueError('Extension value has wrong length')

            record += value

        self.write_record('K', record)
Write a K record::

            writer.write_k_record_extensions([
                ('FXA', 3), ('SIU', 2), ('ENL', 3),
            ])

            writer.write_k_record(datetime.time(2, 3, 4), ['023', 13, 2])

            # -> J030810FXA1112SIU1315ENL
            # -> K02030402313002

        :param time: UTC time of the k record (default:
            :meth:`~datetime.datetime.utcnow`)
        :param extensions: a list of extension values according to previous
            declaration through
            :meth:`~aerofiles.igc.Writer.write_k_record_extensions`