from typing import List
from typing import Dict
from typing import Any


def batch_dictionary(products: List[Dict[str, Any]]):
  """Creates dictionary with the entries info for error control.

  Args:
    products: Chunk of products prepared to be uploaded.

  Returns:
    Dictionary with the batchId as key and the method as value.
  """

  entries_dict = {}
  for product in products:
    batch_num = product['batchId']
    entries_dict[batch_num] = {
      'method': product['method']
    }

  return entries_dict