docstr: Returns URL information as defined in settings.
  
  When get_page_name=True returns URL without anything after {slug} e.g.
  if in settings: CATEGORY_URL="cat/{slug}.html" this returns
  "cat/{slug}" Useful for pagination.
docstr_tok: ["Returns","URL","information","as","defined","in","settings",".","When","get_page_name=True","returns","URL","without","anything","after","{","slug","}","e.g",".","if","in","settings",":","CATEGORY_URL=","''","cat\/","{","slug","}",".html","''","this","returns","''","cat\/","{","slug","}","''","Useful","for","pagination","."]
code: def _from_settings(self, key, get_page_name=False):
      """Returns URL information as defined in settings.
  
      When get_page_name=True returns URL without anything after {slug} e.g.
      if in settings: CATEGORY_URL="cat/{slug}.html" this returns
      "cat/{slug}" Useful for pagination.
  
      """
      setting = f"{self.__class__.__name__.upper()}_{key}"
      value = self.settings[setting]
      if isinstance(value, pathlib.Path):
          value = str(value)
      if not isinstance(value, str):
          logger.warning("%s is set to %s", setting, value)
          return value
      else:
          if get_page_name:
              return os.path.splitext(value)[0].format(**self.as_dict())
          else:
              return value.format(**self.as_dict())
  
imports: import functools
  import logging
  import os
  import pathlib
  from pelican.utils import slugify
label_desc: Use image node_id 14 for calling the URLWrapper obj's underlying member method code with example usage: obj._from_settings(key, get_page_name) and returns: value, os, value