def search_pattern(alarms, searchFor):
    """Helper function to search pattern in the Alarm Names.

    Arguments:
        alarms {dict} -- dictionary with all SMC alarms
        searchFor {str} -- search pattern entered by user

    Returns:
        [list] -- List with all matched Alarms if successm None if not found
    """
    alarm_list = []
    for key in alarms.keys():
        if searchFor in key:
            alarm_list.append(alarms[key])
    if alarm_list:
        return alarm_list
    else:
        return None