code: def snake_case(string):
      
      if not string:
          return string
      string = string.replace('-', '_').replace(' ', '_')
      return de_camel(string)
docs: Converts a string to snake case. For example::
  
          snake_case('OneTwoThree') -> 'one_two_three'