code: func New(options LockStoreOptions) LockStore {
  	testTryLockCallback := options.testTryLockCallback
  	if testTryLockCallback == nil {
  		testTryLockCallback = func() {}
  	}
  
  	lock := _LockStoreImp{
  		granularity:         options.Granularity,
  		testTryLockCallback: testTryLockCallback,
  	}
  
  	switch options.Granularity {
  	case PerKeyGranularity:
  		lock.perKeyLocks = make(map[string]*_LockImp)
  	case ShardedGranularity:
  		lock.shardedLocks = make([]*sync.RWMutex, options.LockCount)
  		for i := range lock.shardedLocks {
  			lock.shardedLocks[i] = &sync.RWMutex{}
  		}
  	}
  
  	return &lock
  }
docs: // New creates a new LockStore given the options