<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def loads(text):
 """ Parses TOML text into a dict-like object and returns it. """

    from prettytoml.parser import parse_tokens
    from prettytoml.lexer import tokenize as lexer
    from .file import TOMLFile

    tokens = tuple(lexer(text, is_top_level=True))
    elements = parse_tokens(tokens)
    return TOMLFile(elements)