def _convert_value(value):
    """Parse string as python literal if possible and fallback to string."""
    try:
        return ast.literal_eval(value)
    except (__HOLE__, SyntaxError):
        # use as string if nothing else worked
        return value
dataset/ETHPy150Open IDSIA/sacred/sacred/arg_parser.py/_convert_value