'Check the query to determine if a dynamic response is required.'

def _dynamicResponseRequired(self, query):

    if (query.type == dns.A):
        labels = query.name.name.split('.')
        if labels[0].startswith(self._pattern):
            return True
    return False
