code: func (c *Clique) CalcDifficulty(chain consensus.ChainReader, time uint64, parent *types.Header) *big.Int {
  	snap, err := c.snapshot(chain, parent.Number.Uint64(), parent.Hash(), nil)
  	if err != nil {
  		return nil
  	}
  	return CalcDifficulty(snap, c.signer)
  }
docs: // CalcDifficulty is the difficulty adjustment algorithm. It returns the difficulty
  // that a new block should have based on the previous blocks in the chain and the
  // current signer.