code: private function buildCursorFromLastItem(CursorStrategyInterface $cursorStrategy, Result $result)
      {
          if (! $result->hasKey('LastEvaluatedKey')) {
              return null;
          }
  
          $items    = $result->get('Items');
          $lastItem = $this->marshaler->unmarshalItem(end($items));
  
          return $cursorStrategy->buildCursorFromKey($lastItem);
      }
docs: @param CursorStrategyInterface $cursorStrategy
  @param Result                  $result
  
  @return null|string