def maliciousness_to_dbotscore(maliciousness, threshold):

    """

    Translates EclecticIQ obversable maliciousness confidence level to DBotScore based on given threshold

    Parameters
    ----------
    maliciousness : str
        EclecticIQ obversable maliciousness confidence level.
    threshold : str
        Minimum maliciousness confidence level to consider the IOC malicious.

    Returns
    -------
    number
        Translated DBot Score

    """
    maliciousness_list = ['unknown', 'safe', 'low', 'medium', 'high']

    maliciousness_dictionary = {
        'unknown': 0,
        'safe': 1,
        'low': 2,
        'medium': 2,
        'high': 3
    }

    for i in maliciousness_list[maliciousness_list.index(threshold):]:
        maliciousness_dictionary[i] = 3

    return maliciousness_dictionary[maliciousness]