@staticmethod
def _resolve_param_names(params):
    """
        Handle conflict resolution for ParamMaps with multiple Params of the same name.
        This renames Params as follows:
         - Use Param.name if there are no conflicts: `maxIter`
         - Add prefix Param.parent.uid + '.' if needed: `KMeans_529d38e73a74.maxIter`
        :param params: list of Params which will be logged within a single run
        :return: dict mapping Params to names usable for logging
        """
    from collections import defaultdict
    grouped = defaultdict(list)
    for param in params:
        grouped[param.name].append(param)
    resolved = dict()
    for param_name, duplicate_params in grouped.items():
        if len(duplicate_params) == 1:
            resolved[duplicate_params[0]] = param_name
        else:
            for p in duplicate_params:
                resolved[p] = p.parent + '.' + p.name
    return resolved
