@staticmethod
def unsafe_escape_like_string(parameter: str, escape_character: str='=') ->str:
    """
        This function purely escapes a string for use in an ILIKE or LIKE
        It does NOT make it safe to directly format a string.  YOU MUST
        STILL USE PSYCOPG2 PARAMETERIZATION.

        This makes it so that if you search for a string that includes a '%'
        character it still works.

        ..code::python

            my_search_string = 'something%or_another'
            escaped_search_string = escape_like_strings(my_search_string)
            query = "SELECT * FROM my_table WHERE name LIKE %s ESCAPE '='"
            execute_query(query, (f'%{escaped_search_string}%',))
        """
    return parameter.replace(escape_character, f'{escape_character * 2}'
        ).replace('%', f'{escape_character}%').replace('_',
        f'{escape_character}_')
