input: Write a python function to reverse a string based on direction, using threading.
  assert reverse_string('Hello World', 'left') == 'dlroW olleH'
  assert reverse_string('Python', 'left') == 'nohtyP'
  assert reverse_string('Python', 'right') == 'Python'
output: def reverse_string(s, direction):
      import threading
      
      def reverse(s):
          return s[::-1]
      
      if direction == 'left':
          result = [None]
          def worker():
              result[0] = reverse(s)
          thread = threading.Thread(target=worker)
          thread.start()
          thread.join()
          return result[0]
      else:
          return s