def validate_ip_domain(self, indicator, indicator_type):
        """
        To validate if the given indicator is a valid IP or domain.

        Args:
            indicator (str): The indicator to be validated.
            regex_pattern (str): The regular expression pattern to match the indicator.

        Returns:
            bool: True if the indicator is a valid IP or domain, False otherwise.
        """
        __method_name = inspect.currentframe().f_code.co_name
        if indicator_type == "ip":
            return self.validate_ip(indicator)
        elif re.search(consts.DOMAIN_REGEX, indicator):
            applogger.debug("{}(method={}) : {} is a valid domain.".format(self.logs_starts_with, __method_name, indicator))
            return True
        else:
            applogger.debug("{}(method={}) : {} is not a valid domain.".format(self.logs_starts_with, __method_name, indicator))
            return False

        To validate if the given indicator is a valid IP or domain.

        Args:
            indicator (str): The indicator to be validated.
            regex_pattern (str): The regular expression pattern to match the indicator.

        Returns:
            bool: True if the indicator is a valid IP or domain, False otherwise.
        
Solutions/Team Cymru Scout/Data Connectors/TeamCymruScout/SharedCode/utils.py