input: from typing import List
  from collections import Counter
  
  def can_form_uniform_square(grid: List[List[str]]) -> bool:
      """
      Given a 3 x 3 matrix containing only 'B' and 'W', where 'W' denotes white and 'B' denotes black.
  
      The goal is to modify at most one cell such that there exists a 2 x 2 region with all cells of identical color.
  
      Return true if a 2 x 2 region with the same color can be achieved, otherwise, return false.
  
      Examples:
      >>> grid = [["B","W","B"],["B","W","W"],["B","W","B"]]
      true
      >>> grid = [["B","W","B"],["W","B","W"],["B","W","B"]]
      false
      >>> grid = [["B","W","B"],["B","W","W"],["B","W","W"]]
      true
  
      Constraints:
      grid.length == 3
      grid[i].length == 3
      grid[i][j] is either 'W' or 'B'.
      """
output:     
      for i in range(2):
          for j in range(2):
              square = [grid[i][j], grid[i][j+1], grid[i+1][j], grid[i+1][j+1]]
              count = Counter(square)
              if count['B'] >= 3 or count['W'] >= 3:
                  return True
      return False
  