class_docstr: Base class for storing and searching image signatures in a database
  
  Note:
      You must implement the methods search_single_record and insert_single_record
      in a derived class
docstr: Add a single image to the database
  
  Args:
      path (string): path or identifier for image. If img=None, then path is assumed to be
          a URL or filesystem path
      img (Optional[string]): usually raw image data. In this case, path will still be stored, but
          a signature will be generated from data in img. If bytestream is False, but img is
          not None, then img is assumed to be the URL or filesystem path. Thus, you can store
          image records with a different 'path' than the actual image location (default None)
      bytestream (Optional[boolean]): will the image be passed as raw bytes?
          That is, is the 'path_or_image' argument an in-memory image? If img is None but, this
          argument will be ignored.  If img is not None, and bytestream is False, then the behavior
          is as described in the explanation for the img argument
          (default False)
      metadata (Optional): any other information you want to include, can be nested (default None)
docstr_tok: ["Add","a","single","image","to","the","database","Args",":","path","(","string",")",":","path","or","identifier","for","image",".","If","img=None",",","then","path","is","assumed","to","be","a","URL","or","filesystem","path","img","(","Optional","[","string","]",")",":","usually","raw","image","data",".","In","this","case",",","path","will","still","be","stored",",","but","a","signature","will","be","generated","from","data","in","img",".","If","bytestream","is","False",",","but","img","is","not","None",",","then","img","is","assumed","to","be","the","URL","or","filesystem","path",".","Thus",",","you","can","store","image","records","with","a","different","'path","'","than","the","actual","image","location","(","default","None",")","bytestream","(","Optional","[","boolean","]",")",":","will","the","image","be","passed","as","raw","bytes","?","That","is",",","is","the","'path_or_image","'","argument","an","in-memory","image","?","If","img","is","None","but",",","this","argument","will","be","ignored",".","If","img","is","not","None",",","and","bytestream","is","False",",","then","the","behavior","is","as","described","in","the","explanation","for","the","img","argument","(","default","False",")","metadata","(","Optional",")",":","any","other","information","you","want","to","include",",","can","be","nested","(","default","None",")"]
code: def add_image(
      self,
      path,
      img=None,
      bytestream=False,
      metadata=None,
      refresh_after=False,
  ):
      """Add a single image to the database
  
      Args:
          path (string): path or identifier for image. If img=None, then path is assumed to be
              a URL or filesystem path
          img (Optional[string]): usually raw image data. In this case, path will still be stored, but
              a signature will be generated from data in img. If bytestream is False, but img is
              not None, then img is assumed to be the URL or filesystem path. Thus, you can store
              image records with a different 'path' than the actual image location (default None)
          bytestream (Optional[boolean]): will the image be passed as raw bytes?
              That is, is the 'path_or_image' argument an in-memory image? If img is None but, this
              argument will be ignored.  If img is not None, and bytestream is False, then the behavior
              is as described in the explanation for the img argument
              (default False)
          metadata (Optional): any other information you want to include, can be nested (default None)
  
      """
      rec = make_record(
          path,
          self.gis,
          self.k,
          self.N,
          img=img,
          bytestream=bytestream,
          metadata=metadata,
      )
      self.insert_single_record(rec, refresh_after=refresh_after)
  
file_path: image-match/image_match/signature_database_base.py
imports: from image_match.goldberg import ImageSignature
  from itertools import product
  from operator import itemgetter
  import numpy
label_desc: Use image node_id 4 for calling the SignatureDatabaseBase obj's underlying member method code with example usage: obj.add_image(path, img, bytestream, metadata, refresh_after) without return types