code: def contains_opposite_color_piece(self, square, position):
          
          return not position.is_square_empty(square) and \
              position.piece_at_square(square).color != self.color
docs: Finds if square on the board is occupied by a ``Piece``
          belonging to the opponent.
  
          :type: square: Location
          :type: position: Board
          :rtype: bool