class_docstr: Class to provide helper functions for mathematics and other small things
class_docstr_tok: ["Class","to","provide","helper","functions","for","mathematics","and","other","small","things"]
docstr: Uses OrderedDict to sort a dictionary.
  
  I think it's faster than my implementation.
  
  Args:
      new_dict -> the dictionary to sort
  
  Returns:
      Returns the dict, but sorted.
docstr_tok: ["Uses","OrderedDict","to","sort","a","dictionary",".","I","think","it","'s","faster","than","my","implementation",".","Args",":","new_dict","-",">","the","dictionary","to","sort","Returns",":","Returns","the","dict",",","but","sorted","."]
code: def new_sort(new_dict: dict) -> dict:
      """Uses OrderedDict to sort a dictionary.
  
      I think it's faster than my implementation.
  
      Args:
          new_dict -> the dictionary to sort
  
      Returns:
          Returns the dict, but sorted.
  
      """
      # (f"d is {d}")
      logging.debug(
          f"The old dictionary before new_sort() is {new_dict}"
      )
      sorted_i = OrderedDict(
          sorted(new_dict.items(), key=lambda x: x[1], reverse=True)
      )
      logging.debug(f"The dictionary after new_sort() is {sorted_i}")
      # sortedI = sort_dictionary(x)
      return sorted_i
  
file_path: Ciphey/ciphey/mathsHelper.py
imports: from collections import OrderedDict
  from string import punctuation
  from typing import Optional
  import logging
  from rich.logging import RichHandler
label_desc: Use image node_id 6 for calling the mathsHelper obj's underlying member method code with example usage: obj.new_sort(new_dict) and returns: sorted_i