nodes: 0, module; 1, function_definition; 2, function_name:_get_bmu; 3, parameters; 4, block; 5, identifier:self; 6, identifier:activations; 7, expression_statement; 8, comment:# If the neural gas is a recursive neural gas, we need reverse argsort.; 9, if_statement; 10, expression_statement; 11, return_statement; 12, comment:"""Get indices of bmus, sorted by their distance from input."""; 13, comparison_operator:self.argfunc == 'argmax'; 14, block; 15, assignment; 16, call; 17, attribute; 18, string; 19, expression_statement; 20, identifier:sort; 21, call; 22, attribute; 23, argument_list; 24, identifier:self; 25, identifier:argfunc; 26, string_content:argmax; 27, assignment; 28, attribute; 29, argument_list; 30, identifier:sort; 31, identifier:argsort; 32, identifier:activations; 33, unary_operator; 34, identifier:np; 35, identifier:argsort; 36, identifier:activations; 37, integer:1; 38, identifier:activations
code: def _get_bmu(self, activations):
          """Get indices of bmus, sorted by their distance from input."""
          # If the neural gas is a recursive neural gas, we need reverse argsort.
          if self.argfunc == 'argmax':
              activations = -activations
          sort = np.argsort(activations, 1)
          return sort.argsort()