def get(obj, glob, separator="<STR_LIT:/>"):
ret = None<EOL>found = False<EOL>for item in search(obj, glob, yielded=True, separator=separator):<EOL><INDENT>if ret is not None:<EOL><INDENT>raise ValueError("<STR_LIT>" % glob)<EOL><DEDENT>ret = item[<NUM_LIT:1>]<EOL>found = True<EOL><DEDENT>if found is False:<EOL><INDENT>raise KeyError(glob)<EOL><DEDENT>return ret<EOL>
Given an object which contains only one possible match for the given glob,
return the value for the leaf matching the given glob.

If more than one leaf matches the glob, ValueError is raised. If the glob is
not found, KeyError is raised.