code: def _complete_string(key, haystack):
      
  
      if len(key) == 0:
          return haystack
  
      match = []
      for straw in haystack:
          if string.find(straw, key) == 0:
              match.append(straw)
      return match
docs: Returns valid string completions
  
          Takes the string 'key' and compares it to each of the strings in
          'haystack'. The ones which beginns with 'key' are returned as result.