code: def load_with_fn(load_fn, content_or_strm, container, allow_primitives=False,
                   **options):
      
      ret = load_fn(content_or_strm, **options)
      if anyconfig.utils.is_dict_like(ret):
          return container() if (ret is None or not ret) else container(ret)
  
      return ret if allow_primitives else container(ret)
docs: Load data from given string or stream 'content_or_strm'.
  
      :param load_fn: Callable to load data
      :param content_or_strm: data content or stream provides it
      :param container: callble to make a container object
      :param allow_primitives:
          True if the parser.load* may return objects of primitive data types
          other than mapping types such like JSON parser
      :param options: keyword options passed to 'load_fn'
  
      :return: container object holding data