<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_links(self, **kw):
 """ Prepare links of form by mimicing pyoko's get_links method's result Args: **kw: Returns: list of link dicts """


        links = [a for a in dir(self) if isinstance(getattr(self, a), Model)
                 and not a.startswith('_model')]

        return [
            {
                'field': l,
                'mdl': getattr(self, l).__class__,
            } for l in links
        ]