<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def filename_add_custom_url_params(filename, request):
 """ Adds custom url parameters to filename string :param filename: Initial filename :type filename: str :param request: OGC-type request with specified bounding box, cloud coverage for specific product. :type request: OgcRequest or GeopediaRequest :return: Filename with custom url parameters in the name :rtype: str """

        if hasattr(request, 'custom_url_params') and request.custom_url_params is not None:
            for param, value in sorted(request.custom_url_params.items(),
                                       key=lambda parameter_item: parameter_item[0].value):
                filename = '_'.join([filename, param.value, str(value)])

        return filename