input: from typing import List
  
  
  def solve_maze(grid: List[List[int]], start: tuple, end: tuple) -> List[int]:
      """ Solves a maze represented as a 2D grid of integers, where 1 represents a passable path
      and 0 represents a blocked path. The function finds the shortest path from the start
      position (given as a tuple (start_row, start_col)) to the end position (given as a tuple
      (end_row, end_col)). It returns a list of integers representing the path length to reach
      the end position. If no path is found, it returns an empty list.
      >>> solve_maze([[1, 1], [1, 1]], (0, 0), (1, 1))
      [2]
      >>> solve_maze([[1, 0, 1], [1, 0, 1], [1, 1, 1]], (0, 0), (2, 2))
      [4]
      >>> solve_maze([[1, 0], [0, 1]], (0, 0), (1, 1))
      []
      """
output:     
      rows, cols = len(grid), len(grid[0])
      queue = [(start[0], start[1], 0)]
      visited = set()
      directions = [(0, 1), (1, 0), (0, -1), (-1, 0)]
      
      while queue:
          r, c, dist = queue.pop(0)
          if (r, c) == end:
              return [dist]
          if (r, c) in visited:
              continue
          visited.add((r, c))
          
          for dr, dc in directions:
              nr, nc = r + dr, c + dc
              if 0 <= nr < rows and 0 <= nc < cols and grid[nr][nc] == 1:
                  queue.append((nr, nc, dist + 1))
      
      return []
  