original_docstring: Sort a simple 1-dimensional dictionary
      
docstring: Sort a simple 1-dimensional dictionary
docstring_tokens: Sort a simple 1 - dimensional dictionary
code: def sort(array, reverse=True, sort_by_key=False):
      """Sort a simple 1-dimensional dictionary
      """
      if isinstance(array, dict):
          if not sort_by_key:
              return sorted(array.items(), key=lambda x: x[1], reverse=reverse)
          return sorted(array.items(), key=lambda x: str(x[0]).lower(), reverse=reverse)
      return array
code_tokens: def sort ( array , reverse = True , sort_by_key = False ) : if isinstance ( array , dict ) : if not sort_by_key : return sorted ( array . items ( ) , key = lambda x : x [ 1 ] , reverse = reverse ) return sorted ( array . items ( ) , key = lambda x : str ( x [ 0 ] ) . lower ( ) , reverse = reverse ) return array
short_docstring: Sort a simple 1-dimensional dictionary
short_docstring_tokens: Sort a simple 1 - dimensional dictionary
comment: """Sort a simple 1-dimensional dictionary
      """