docs: def get_citations_by_pmids(manager,
                             pmids: Iterable[Union[str, int]],
                             group_size: Optional[int] = None,
                             sleep_time: Optional[int] = None,
                             ) -> Tuple[Dict[str, Dict], Set[str]]:
      """Get citation information for the given list of PubMed identifiers using the NCBI's eUtils service.
  
      :type manager: pybel.Manager
      :param pmids: an iterable of PubMed identifiers
      :param group_size: The number of PubMed identifiers to query at a time. Defaults to 200 identifiers.
      :param sleep_time: Number of seconds to sleep between queries. Defaults to 1 second.
      :return: A dictionary of {pmid: pmid data dictionary} or a pair of this dictionary and a set ot erroneous
              pmids if return_errors is :data:`True`
      """
      group_size = group_size if group_size is not None else 200
      sleep_time = sleep_time if sleep_time is not None else 1
  
      pmids = clean_pubmed_identifiers(pmids)
      log.info('Ensuring %d PubMed identifiers', len(pmids))
  
      result = {}
      unenriched_pmids = {}
  
      for pmid in pmids:
          citation = manager.get_or_create_citation(type=CITATION_TYPE_PUBMED, reference=pmid)
  
          if not citation.date or not citation.name or not citation.authors:
              unenriched_pmids[pmid] = citation
              continue
  
          result[pmid] = citation.to_json()
  
      manager.session.commit()
  
      log.debug('Found %d PubMed identifiers in database', len(pmids) - len(unenriched_pmids))
  
      if not unenriched_pmids:
          return result, set()
  
      number_unenriched = len(unenriched_pmids)
      log.info('Querying PubMed for %d identifiers', number_unenriched)
  
      errors = set()
      t = time.time()
  
      for pmid_group_index, pmid_list in enumerate(grouper(group_size, unenriched_pmids), start=1):
          pmid_list = list(pmid_list)
          log.info('Getting group %d having %d PubMed identifiers', pmid_group_index, len(pmid_list))
  
          response = get_pubmed_citation_response(pmid_list)
          response_pmids = response['result']['uids']
  
          for pmid in response_pmids:
              p = response['result'][pmid]
              citation = unenriched_pmids[pmid]
  
              successful_enrichment = enrich_citation_model(manager, citation, p)
  
              if not successful_enrichment:
                  log.warning("Error downloading PubMed identifier: %s", pmid)
                  errors.add(pmid)
                  continue
  
              result[pmid] = citation.to_json()
              manager.session.add(citation)
  
          manager.session.commit()  # commit in groups
  
          # Don't want to hit that rate limit
          time.sleep(sleep_time)
  
      log.info('retrieved %d PubMed identifiers in %.02f seconds', len(unenriched_pmids), time.time() - t)
  
      return result, errors