from typing import List


def occupied_in_axis(seating: List[List[str]], row: int, col: int,
                     delta_row: int, delta_col: int, recurse: bool) -> int:
    """Find if there is an occupied seat in an axis."""
    row += delta_row
    col += delta_col
    occupied = 0

    if 0 <= row < len(seating) and 0 <= col < len(seating[0]):
        if seating[row][col] == '#':
            occupied = 1
        elif seating[row][col] == '.' and recurse:
            occupied = (
                occupied_in_axis(seating, row, col, delta_row, delta_col,
                                 recurse)
            )
    return occupied