def unify_duplicated_equal_signs(s: str) -> str:
    """ 
    Removes repeated equal signs only if they are one after the other
    or if they are separated by spaces.
    Example: 'abc===def, mno= =pqr, stv==q==  =' --> 'abc=def, mno=pqr, stv=q='
    """
    sequence_started = False
    new_string = []
    for char in s:
        if not sequence_started:
            new_string.append(char)
            if char == '=':
                sequence_started = True
        else:
            if char != '=' and not char.isspace():
                sequence_started = False
                new_string.append(char)
    return ''.join(new_string)