class_docstr: BagObj(obj)
  
  Convert attribute look-ups to getitems on the object passed in.
  
  Parameters
  ----------
  obj : class instance
      Object on which attribute look-up is performed.
  
  Examples
  --------
  >>> from numpy.lib.npyio import BagObj as BO
  >>> class BagDemo(object):
  ...     def __getitem__(self, key): # An instance of BagObj(BagDemo)
  ...                                 # will call this method when any
  ...                                 # attribute look-up is required
  ...         result = "Doesn't matter what you want, "
  ...         return result + "you're gonna get this"
  ...
  >>> demo_obj = BagDemo()
  >>> bagobj = BO(demo_obj)
  >>> bagobj.hello_there
  "Doesn't matter what you want, you're gonna get this"
  >>> bagobj.I_can_be_anything
  "Doesn't matter what you want, you're gonna get this"
class_docstr_tok: ["BagObj","(","obj",")","Convert","attribute","look-ups","to","getitems","on","the","object","passed","in",".","Parameters","--","--","--","--","--","obj",":","class","instance","Object","on","which","attribute","look-up","is","performed",".","Examples","--","--","--","--",">",">",">","from","numpy.lib.npyio","import","BagObj","as","BO",">",">",">","class","BagDemo","(","object",")",":","...","def","__getitem__","(","self",",","key",")",":","#","An","instance","of","BagObj","(","BagDemo",")","...","#","will","call","this","method","when","any","...","#","attribute","look-up","is","required","...","result","=","``","Does","n't","matter","what","you","want",",","``","...","return","result","+","``","you","'re","gon","na","get","this","''","...",">",">",">","demo_obj","=","BagDemo","(",")",">",">",">","bagobj","=","BO","(","demo_obj",")",">",">",">","bagobj.hello_there","''","Does","n't","matter","what","you","want",",","you","'re","gon","na","get","this","''",">",">",">","bagobj.I_can_be_anything","''","Does","n't","matter","what","you","want",",","you","'re","gon","na","get","this","''"]
code: def __getattribute__(self, key):
      try:
          return object.__getattribute__(self, "_obj")[key]
      except KeyError:
          raise AttributeError(key)
  
imports: from __future__ import division, absolute_import, print_function
  import sys
  import os
  import re
  import functools
  import itertools
  import warnings
  import weakref
  from operator import itemgetter, index
  import numpy
  from .None import format
  from ._datasource import DataSource
  from numpy.core import overrides
  from numpy.core.multiarray import packbits, unpackbits
  from numpy.core.overrides import set_module
  from numpy.core._internal import recursive
  from ._iotools import LineSplitter, NameValidator, StringConverter, ConverterError, ConverterLockError, ConversionWarning, _is_string_like, has_nested_fields, flatten_dtype, easy_dtype, _decode_line
  from numpy.compat import asbytes, asstr, asunicode, asbytes_nested, bytes, basestring, unicode, os_fspath, os_PathLike
  from numpy.core.numeric import pickle
label_desc: Use image node_id 2 for calling the BagObj obj's underlying member method code with example usage: obj.__getattribute__(key) and returns: object