code: def _natural_sort_strings(vals, reverse=False):
      def key(v):
          v_parts = re.split(r"(\d+)", v)
          for i in range(len(v_parts)):
              try:
                  v_parts[i] = int(v_parts[i])
              except ValueError:
                  # not an int
                  pass
          return tuple(v_parts)
  
      return sorted(vals, key=key, reverse=reverse)
  
imports: import decimal
  import json
  import sys
  import re
  from functools import reduce
  from _plotly_utils.optional_imports import get_module
  from _plotly_utils.basevalidators import ImageUriValidator
label_desc: Use image node_id 4 for calling a global function with example usage: _natural_sort_strings(vals, reverse) and returns: sorted, tuple