def METHOD_NAME(f1):
    lines = f1.splitlines()
    for i, line in enumerate(lines):
        if line.strip().startswith('#'):
            continue
        if 'if' in line and ':' in line and not ('"' in line or "'" in line) and not line.strip().endswith(':'):
            pre, post = line.split(':', 1)
            if post and not (post.strip().startswith('#') or ']' in line):
                pre_indent = '    '
                count = 0
                while pre.startswith(pre_indent):
                    count += 1
                    pre_indent = '    ' * count
                lines[i] = pre + ':\n' + pre_indent + post.strip()
    return '\n'.join(lines)