code: def _prepare_batches(graphs: Sequence[Any], max_parallel: int):
      num_parts = np.floor(len(graphs) / max_parallel)
      num_parts = max(num_parts, 1)
      pipelines_parts = [
          x.tolist() for x in np.array_split(graphs, num_parts)
      ]
      return pipelines_parts
  
imports: import os
  from dataclasses import dataclass
  from typing import List, Optional, Sequence, Any, TypeVar, Callable, Hashable
  import numpy
  from golem.core.log import default_log
  from golem.core.optimisers.genetic.evaluation import DelegateEvaluator
  from golem.utilities.serializable import Serializable
  from fedot.core.data.data import InputData
  from fedot.remote.infrastructure.clients.client import Client
  from fedot.utilities.pattern_wrappers import singleton
label_desc: Use image node_id 2 for calling a global function with example usage: _prepare_batches(graphs, max_parallel) and returns: pipelines_parts