code: def filtered_list(cls, name=None, obj=None):
          
          options = {}
          if name:
              options['id'] = cls.usable_id(name)
  
          def obj_ok(dc, obj):
              if not obj or obj['datacenter_id'] == dc['id']:
                  return True
              return False
  
          return [x for x in cls.list(options) if obj_ok(x, obj)]
docs: List datacenters matching name and compatible
          with obj