code: def create_index(self,
                       table: str,
                       field: str,
                       nchars: int = None,
                       indexname: str = None,
                       unique: bool = False) -> Optional[int]:
          
          limit = ""
          if nchars is not None:
              limit = "({})".format(nchars)
          if indexname is None:
              indexname = "_idx_{}".format(field)
          if self.index_exists(table, indexname):
              return None
          uniquestr = "UNIQUE" if unique else ""
          sql = (
              "CREATE {unique} INDEX {indexname} "
              "ON {table} ({field}{limit})".format(
                  unique=uniquestr,
                  indexname=indexname,
                  table=table,
                  field=field,
                  limit=limit,
              )
          )
          return self.db_exec(sql)
docs: Creates an index (default name _idx_FIELDNAME), unless it exists
          already.