code: def _refs(obj, named, *ats, **kwds):
      '''Return specific attribute objects of an object.
      '''
      if named:
          for a in ats:  # cf. inspect.getmembers()
              if hasattr(obj, a):
                  yield _NamedRef(a, getattr(obj, a))
          if kwds:  # kwds are _dir2() args
              for a, o in _dir2(obj, **kwds):
                  yield _NamedRef(a, o)
      else:
          for a in ats:  # cf. inspect.getmembers()
              if hasattr(obj, a):
                  yield getattr(obj, a)
          if kwds:  # kwds are _dir2() args
              for _, o in _dir2(obj, **kwds):
                  yield f _refs(obj, named, *ats, **kwds):
      '''Return specific attribute objects of an object.
      '''
      if named:
          for a in ats:  # cf. inspect.getmembers()
              if hasattr(obj, a):
                  yield _NamedRef(a, getattr(obj, a))
          if kwds:  # kwds are _dir2() args
              for a, o in _dir2(obj, **kwds):
                  yield _NamedRef(a, o)
      else:
          for a in ats:  # cf. inspect.getmembers()
              if hasattr(obj, a):
                  yield getattr(obj, a)
          if kwds:  # kwds are _dir2() args
              for _, o in _dir2(obj, **kwds):
                  yield o
docs: Return specific attribute objects of an object.