def METHOD_NAME(self, string, option, name, value):
    """Sets a object trait if a specified option string is found."""
    col = string.find(option)
    if col >= 0:
        string = string[:col] + string[col + len(option) :]
        setattr(self, name, value)
    return string