<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ParseCallsRow(self, parser_mediator, query, row, **unused_kwargs):
 """Parses a Call record row. Args: parser_mediator (ParserMediator):
 mediates interactions between parsers and other components, such as storage and dfvfs. query (str):
 query that created the row. row (sqlite3.Row):
 row. """

    query_hash = hash(query)

    call_type = self._GetRowValue(query_hash, row, 'type')
    call_type = self.CALL_TYPE.get(call_type, 'UNKNOWN')
    duration = self._GetRowValue(query_hash, row, 'duration')
    timestamp = self._GetRowValue(query_hash, row, 'date')

    event_data = AndroidCallEventData()
    event_data.call_type = call_type
    event_data.duration = self._GetRowValue(query_hash, row, 'duration')
    event_data.name = self._GetRowValue(query_hash, row, 'name')
    event_data.number = self._GetRowValue(query_hash, row, 'number')
    event_data.offset = self._GetRowValue(query_hash, row, 'id')
    event_data.query = query

    date_time = dfdatetime_java_time.JavaTime(timestamp=timestamp)
    event = time_events.DateTimeValuesEvent(date_time, 'Call Started')
    parser_mediator.ProduceEventWithEventData(event, event_data)

    if duration:
      if isinstance(duration, py2to3.STRING_TYPES):
        try:
          duration = int(duration, 10)
        except ValueError:
          duration = 0

      # The duration is in seconds and the date value in milliseconds.
      timestamp += duration * 1000

      date_time = dfdatetime_java_time.JavaTime(timestamp=timestamp)
      event = time_events.DateTimeValuesEvent(date_time, 'Call Ended')
      parser_mediator.ProduceEventWithEventData(event, event_data)