<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def text_definition(self, nid):
 """ Retrieves logical definitions for a class or relation id Arguments --------- nid : str Node identifier for entity to be queried Returns ------- TextDefinition """

        tdefs = []
        meta = self._meta(nid)
        if 'definition' in meta:
            obj = meta['definition']
            return TextDefinition(nid, **obj)
        else:
            return None