code: def get_method_by_idx(self, idx):
          
          if self.__cached_methods_idx == None:
              self.__cached_methods_idx = {}
              for i in self.classes.class_def:
                  for j in i.get_methods():
                      self.__cached_methods_idx[j.get_method_idx()] = j
  
          try:
              return self.__cached_methods_idx[idx]
          except KeyError:
              return None
docs: Return a specific method by using an index
            :param idx: the index of the method
            :type idx: int
  
            :rtype: None or an :class:`EncodedMethod` object