<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def dims_knight(self, move):
    '''Knight on the rim is dim'''
    if self.board.piece_type_at(move.from_square) == chess.KNIGHT:
      rim = SquareSet(
          chess.BB_RANK_1 | \
          chess.BB_RANK_8 | \
          chess.BB_FILE_A | \
          chess.BB_FILE_H)
      return move.to_square in rim