<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def append(self, station):
 """ Append station to database. Returns the index of the appended station. """

        rec = station._pack(self)
        with self:
            _libtcd.add_tide_record(rec, self._header)
            return self._header.number_of_records - 1