def get_key(my_dict, val):
    """Get the key based on a value

    :param my_dict: dictionary with key - value pair
    :type my_dict: [dict
    :param val: value used to find the key
    :type val: any
    :return: key
    :rtype: any
    """
    for key, value in my_dict.items():
        if val == value:
            return key

    return None