code: def get_sort_indexes_1d(data, sort_fn=None, top_n=None):
      if top_n is None:
          top_n = len(data)
  
      if sort_fn is not None:
          scored_vals = list(map(sort_fn, data))
          return np.argsort(scored_vals)[:top_n]
      else:
          return np.arange(top_n)
  
imports: import plotly.graph_objs
  import numpy
  from plotly import subplots
  import matplotlib.pyplot
  from numbers import Number
  import logging
label_desc: Use image node_id 18 for calling a global function with example usage: get_sort_indexes_1d(data, sort_fn, top_n) and returns: np, np