code: def test_flatten(backend):
      input = torch.randn(1, 1, 5, 5)
      model = nn.Sequential(
          nn.Conv2d(1, 32, 5, 1, 1), nn.Flatten(), nn.ReLU()
      )
      pytorch_prediction = model(input).detach().numpy()
      input_shape = (None, 1, 5, 5)
  
      config = config_from_pytorch_model(model)
      output_dir = str(
          test_root_path
          / f"hls4mlprj_pytorch_api_flatten_backend_{backend}"
      )
      hls_model = convert_from_pytorch_model(
          model,
          input_shape,
          hls_config=config,
          output_dir=output_dir,
          backend=backend,
      )
      hls_model.compile()
  
      pred = hls_model.predict(input.detach().numpy())
      hls_prediction = np.reshape(pred, (1, 288))
  
      np.testing.assert_allclose(
          hls_prediction, pytorch_prediction, rtol=0, atol=5e-2
      )
  
imports: import math
  from pathlib import Path
  import numpy
  import pytest
  import torch
  import torch.nn
  from torch.nn import AvgPool1d, AvgPool2d, MaxPool1d, MaxPool2d
  from hls4ml.converters import convert_from_pytorch_model
  from hls4ml.utils.config import config_from_pytorch_model
label_desc: Use image node_id 9 for calling a global function with example usage: test_flatten(backend) without return types