code: def getsize(store, path=None):
      
      path = normalize_storage_path(path)
      if hasattr(store, 'getsize'):
          # pass through
          return store.getsize(path)
      elif isinstance(store, dict):
          # compute from size of values
          if path in store:
              v = store[path]
              size = buffer_size(v)
          else:
              members = listdir(store, path)
              prefix = _path_to_prefix(path)
              size = 0
              for k in members:
                  try:
                      v = store[prefix + k]
                  except KeyError:
                      pass
                  else:
                      try:
                          size += buffer_size(v)
                      except TypeError:
                          return -1
          return size
      else:
          return -1
docs: Compute size of stored items for a given path. If `store` provides a `getsize`
      method, this will be called, otherwise will return -1.