<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(self, name, document):
 """Parse and compile the given Thrift document. :param str name: Name of the Thrift document. :param str document: The Thrift IDL as a string. """

        return self.compiler.compile(name, document).link().surface