def _chunk_page_ids(page_ids, chunk_size=50):
  """
  Returns a list of lists to limit page ids being queried to specified size.

  :param chunk_size:
  :param page_ids: List of pageids
  :return:
  """
  if not page_ids:
    return []

  page_id_chunks = []
  while len(page_ids) > chunk_size:
    page_id_chunks.append(page_ids[0:chunk_size])
    page_ids = page_ids[chunk_size:]
  page_id_chunks.append(page_ids)
  return page_id_chunks