code: def probably_wkt(text):
      '''Quick check to determine if the provided text looks like WKT'''
      valid = False
      valid_types = set([
          'POINT', 'LINESTRING', 'POLYGON', 'MULTIPOINT',
          'MULTILINESTRING', 'MULTIPOLYGON', 'GEOMETRYCOLLECTION',
      ])
      matched = re.match(r'(\w+)\s*\([^)]+\)', text.strip())
      if matched:
          valid = matched.group(1).upper() in valid_types
      return valif probably_wkt(text):
      '''Quick check to determine if the provided text looks like WKT'''
      valid = False
      valid_types = set([
          'POINT', 'LINESTRING', 'POLYGON', 'MULTIPOINT',
          'MULTILINESTRING', 'MULTIPOLYGON', 'GEOMETRYCOLLECTION',
      ])
      matched = re.match(r'(\w+)\s*\([^)]+\)', text.strip())
      if matched:
          valid = matched.group(1).upper() in valid_types
      return valid
docs: Quick check to determine if the provided text looks like WKT