def url_builder(self, endpoint, path_variable=None):
        """Build a URL based on the provided endpoint and optional path variable.

        Args:
            endpoint: The base endpoint to build the URL.
            path_variable: Optional path variable to append to the endpoint.

        Returns:
            The constructed URL.
        """
        __method_name = inspect.currentframe().f_code.co_name
        try:
            if path_variable:
                url = consts.BASE_URL.format(endpoint.format(path_variable))
            else:
                url = consts.BASE_URL.format(endpoint)
                url += "?fields={}".format(consts.FIELDS)
                if consts.CONFIDENCE_THRESHOLD:
                    url += "&confidence={}".format(consts.CONFIDENCE_THRESHOLD)
            return url
        except Exception as err:
            applogger.error(
                self.log_format.format(
                    consts.LOGS_STARTS_WITH,
                    __method_name,
                    self.azure_function_name,
                    consts.UNEXPECTED_ERROR_MSG.format(err),
                )
            )
            raise InfobloxException()
Build a URL based on the provided endpoint and optional path variable.

        Args:
            endpoint: The base endpoint to build the URL.
            path_variable: Optional path variable to append to the endpoint.

        Returns:
            The constructed URL.
        
Solutions/Infoblox/Data Connectors/InfobloxCloudDataConnector/InfobloxHistoricalToAzureStorage/infoblox_to_azure_storage.py