input: from typing import List, Tuple
  
  def solve_maze(grid: List[List[int]]) -> List[int]:
      """ Given a 2D maze grid where 1 represents a valid path and 0 or None represents
      an obstacle or empty space, find and return the shortest path from the start
      (top-left corner) to the end (bottom-right corner). The path should be represented
      as a list of integers where each integer is the number of steps from the start to
      reach that point in the path. If no path exists, return an empty list.
      
      >>> solve_maze([[1, 0, 1], [1, 1, 1], [0, 1, 1]])
      [0, 3, 6]
      >>> solve_maze([[1, 1, 1], [0, 0, 1], [1, 0, 1]])
      []
      """
output:     if not grid or not grid[0]:
          return []
      
      rows, cols = len(grid), len(grid[0])
      directions = [(-1, 0), (1, 0), (0, -1), (0, 1)]
      
      queue = [(0, 0, 0)]
      visited = set((0, 0))
      path = []
      
      while queue:
          r, c, steps = queue.pop(0)
          path.append(steps)
          
          if r == rows - 1 and c == cols - 1:
              return path
          
          for dr, dc in directions:
              nr, nc = r + dr, c + dc
              if 0 <= nr < rows and 0 <= nc < cols and (nr, nc) not in visited and grid[nr][nc] == 1:
                  visited.add((nr, nc))
                  queue.append((nr, nc, steps + 1))
      
      return []