def remove_comments_from_line(line):
    if '#' not in line:
        return line.strip()
    return line[:line.index('#')].strip()
dataset/ETHPy150Open Alexis-benoist/eralchemy/eralchemy/parser.py/remove_comments_from_line/original