<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_methods(self):
 """ Return direct and virtual methods :rtype: a list of :class:`EncodedMethod` objects """

        return [x
                for x in self.direct_methods] + [x
                                                 for x in self.virtual_methods]