code: def is_attacked_by(self, color: Color, square: Square) -> bool:
          
          return bool(self.attackers_mask(color, square))
docs: Checks if the given side attacks the given square.
  
          Pinned pieces still count as attackers. Pawns that can be captured
          en passant are **not** considered attacked.