




'''simple docstring'''


import pytest

from datasets.parallel import ParallelBackendConfig, parallel_backend
from datasets.utils.py_utils import map_nested

from .utils import require_dill_gt_0_3_2, require_joblibspark, require_not_windows


def 						SCREAMING_SNAKE_CASE       (      a_	:							List[str]			):  # picklable for multiprocessing
  return i + 1


@require_dill_gt_0_3_2
@require_joblibspark
@require_not_windows
def 						SCREAMING_SNAKE_CASE       (      ):
  with parallel_backend('spark'			):
    assert ParallelBackendConfig.backend_name == "spark"

  __a			=					[1, 2, 3]
  with pytest.raises(a_			):
    with parallel_backend('unsupported backend'			):
      map_nested(a_				,					a_				,					num_proc=2			)

  with pytest.raises(a_			):
    with parallel_backend('unsupported backend'			):
      map_nested(a_				,					a_				,					num_proc=-1			)


@require_dill_gt_0_3_2
@require_joblibspark
@require_not_windows
@pytest.mark.parametrize('num_proc'				,					[2, -1]			)
def 						SCREAMING_SNAKE_CASE       (      a_	:							Union[str, Any]			):
  __a			=					[1, 2]
  __a			=					{'a': 1, 'b': 2}
  __a			=					{'a': [1, 2], 'b': [3, 4]}
  __a			=					{'a': {'1': 1}, 'b': 2}
  __a			=					{'a': 1, 'b': 2, 'c': 3, 'd': 4}
  __a			=					[2, 3]
  __a			=					{'a': 2, 'b': 3}
  __a			=					{'a': [2, 3], 'b': [4, 5]}
  __a			=					{'a': {'1': 2}, 'b': 3}
  __a			=					{'a': 2, 'b': 3, 'c': 4, 'd': 5}

  with parallel_backend('spark'			):
    assert map_nested(a_				,					a_				,					num_proc=a_			) == expected_map_nested_sa
    assert map_nested(a_				,					a_				,					num_proc=a_			) == expected_map_nested_sa
    assert map_nested(a_				,					a_				,					num_proc=a_			) == expected_map_nested_sa
    assert map_nested(a_				,					a_				,					num_proc=a_			) == expected_map_nested_sa
    assert map_nested(a_				,					a_				,					num_proc=a_			) == expected_map_nested_sa









'''simple docstring'''


import os


def 						SCREAMING_SNAKE_CASE       (      ):
  with open(os.path.dirname(a_			) + '/grid.txt'			) as f:
    __a			=					[]  # noqa: E741
    for _ in range(20			):
      l.append([int(a_			) for x in f.readline().split()]			)

    __a			=					0

    # right
    for i in range(20			):
      for j in range(17			):
        __a			=					l[i][j] * l[i][j + 1] * l[i][j + 2] * l[i][j + 3]
        if temp > maximum:
          __a			=					temp

        # down
    for i in range(17			):
      for j in range(20			):
        __a			=					l[i][j] * l[i + 1][j] * l[i + 2][j] * l[i + 3][j]
        if temp > maximum:
          __a			=					temp

        # diagonal 1
    for i in range(17			):
      for j in range(17			):
        __a			=					l[i][j] * l[i + 1][j + 1] * l[i + 2][j + 2] * l[i + 3][j + 3]
        if temp > maximum:
          __a			=					temp

        # diagonal 2
    for i in range(17			):
      for j in range(3				,					20			):
        __a			=					l[i][j] * l[i + 1][j - 1] * l[i + 2][j - 2] * l[i + 3][j - 3]
        if temp > maximum:
          __a			=					temp
    return maximum


if __name__ == "__main__":
  print(solution())



