code: def download_article_from_ids(**id_dict):
      
      valid_id_types = ['eid', 'doi', 'pmid', 'pii']
      assert all([k in valid_id_types for k in id_dict.keys()]),\
          ("One of these id keys is invalid: %s Valid keys are: %s."
           % (list(id_dict.keys()), valid_id_types))
      if 'doi' in id_dict.keys() and id_dict['doi'].lower().startswith('doi:'):
          id_dict['doi'] = id_dict['doi'][4:]
      content = None
      for id_type in valid_id_types:
          if id_type in id_dict.keys():
              content = download_article(id_dict[id_type], id_type)
              if content is not None:
                  break
      else:
          logger.error("Could not download article with any of the ids: %s."
                       % str(id_dict))
      return content
docs: Download an article in XML format from Elsevier matching the set of ids.
  
      Parameters
      ----------
      <id_type> : str
          You can enter any combination of eid, doi, pmid, and/or pii. Ids will be
          checked in that order, until either content has been found or all ids
          have been checked.
  
      Returns
      -------
      content : str or None
          If found, the content is returned as a string, otherwise None is
          returned.