code: def get_ordered_idx(id_type, id_list, meta_df):
      
      if meta_df is not None:
          if id_type is None:
              id_list = range(0, len(list(meta_df.index)))
          elif id_type == "id":
              lookup = {x: i for (i,x) in enumerate(meta_df.index)}
              id_list = [lookup[str(i)] for i in id_list]
          return sorted(id_list)
      else:
          return None
docs: Gets index values corresponding to ids to subset and orders them.
      Input:
          - id_type (str): either "id", "idx" or None
          - id_list (list): either a list of indexes or id names
      Output:
          - a sorted list of indexes to subset a dimension by