<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_records(self, zone_id, ttl=None, data=None, host=None, record_type=None):
 """List, and optionally filter, records within a zone. :param zone: the zone name in which to search. :param int ttl: time in seconds :param str data: the records data :param str host: record's host :param str record_type: the type of record :returns: A list of dictionaries representing the matching records within the specified zone. """

        _filter = utils.NestedDict()

        if ttl:
            _filter['resourceRecords']['ttl'] = utils.query_filter(ttl)

        if host:
            _filter['resourceRecords']['host'] = utils.query_filter(host)

        if data:
            _filter['resourceRecords']['data'] = utils.query_filter(data)

        if record_type:
            _filter['resourceRecords']['type'] = utils.query_filter(
                record_type.lower())

        results = self.service.getResourceRecords(
            id=zone_id,
            mask='id,expire,domainId,host,minimum,refresh,retry,'
            'mxPriority,ttl,type,data,responsiblePerson',
            filter=_filter.to_dict(),
        )

        return results