def METHOD_NAME(self, rtype=None, name=None, content=None):
    if rtype and name:  # doing a simple query is enough if we have type and name
        query = dns.message.make_query(name, rtype)
    else:  # if not, perform a zone transfert to get all records
        query = dns.xfr.make_query(
            dns.versioned.Zone(self.zone), keyring=self.keyring
        )[0]
        self.cached_zone_content = {}
    answers = self._run_query(query).answer
    records = []
    for answer in answers:  # filter unwanted results
        a_name = answer.name.to_text().rstrip(".")
        if name and name != a_name:
            continue
        a_rtype = dns.rdatatype.to_text(answer.rdtype)
        if rtype and rtype != a_rtype:
            continue
        for rdata in answer:
            rdata = rdata.to_text()
            if content and content != rdata:
                continue
            identifier = _identifier(a_rtype, a_name, rdata)
            record = {
                "type": a_rtype,
                "name": a_name,
                "ttl": answer.ttl,
                "content": rdata,
                "id": identifier,
            }
            records.append(record)
            self.cached_zone_content[identifier] = (a_rtype, a_name, rdata)
    LOGGER.debug("list_records: %s", records)
    LOGGER.debug("Number of records retrieved: %d", len(records))
    return records