code: def _common_prefix(names):
      
      if not names:
          return ''
      prefix = names[0]
      for name in names:
          i = 0
          while i < len(prefix) and i < len(name) and prefix[i] == name[i]:
              i += 1
          prefix = prefix[:i]
      return prefix
docs: Get the common prefix for all names