input: Write a function to remove duplicate characters from a given string. Ensure the function returns a new string with all unique characters in the order of their first appearance.
  
  def remove_duplicate_characters(string):
      result = ""
      seen = set()
      for char in string:
          if char not in seen:
              seen.add(char)
              result += char
      return result
  
  assert remove_duplicate_characters("bufferoverflow")=="bufrvew"
  assert remove_duplicate_characters("aaabbccdd")=="abcd"
  assert remove_duplicate_characters("python")=="python"
  assert remove_duplicate_characters("")==""
  assert remove_duplicate_characters("a")=="a"
output: def remove_duplicate_characters(string):
      result = ""
      seen = set()
      for char in string:
          if char not in seen:
              seen.add(char)
              result += char
      return result