docs: def get_drug(drug_name: str,
               name_is_generic: bool = False,
               include_categories: bool = False) -> Optional[Drug]:
      """
      Converts a drug name to a :class:`.Drug` class.
  
      If you already have the generic name, you can get the Drug more
      efficiently by setting ``name_is_generic=True``.
  
      Set ``include_categories=True`` to include drug categories (such as
      tricyclics) as well as individual drugs.
      """
      drug_name = drug_name.strip().lower()
      if name_is_generic:
          drug = DRUGS_BY_GENERIC_NAME.get(drug_name)  # type: Optional[Drug]
          if drug is not None and drug.category_not_drug and not include_categories:  # noqa
              return None
          return drug
      else:
          for d in DRUGS:
              if d.name_matches(drug_name):
                  return d
          return None