class_ can either be live object or a classname

    # fpath = ut.truepath('~/code/ibeis/ibeis/viz/viz_graph2.py')
    # classname = 'AnnotGraphWidget'
494714
def check_static_member_vars(class_, fpath=None, only_init=True):
    
    #import ast
    #import astor
    import utool as ut

    if isinstance(class_, six.string_types):
        classname = class_
        if fpath is None:
            raise Exception('must specify fpath')
    else:
        # We were given a live object
        if not isinstance(class_, type):
            # We were given the class instance not the class
            class_instance = class_
            class_ = class_instance.__class__
        classname = class_.__name__
        if fpath is None:
            module = ut.get_module_from_class(class_)
            fpath = ut.get_modpath(module)

    sourcecode = ut.readfrom(fpath)

    import redbaron
    # Pares a FULL syntax tree that keeps blockcomments
    baron = redbaron.RedBaron(sourcecode)

    for node in baron:
        if node.type == 'class' and node.name == classname:
            classnode = node
            break

    def find_parent_method(node):
        par = node.parent_find('def')
        if par is not None and par.parent is not None:
            if par.parent.type == 'class':
                return par
            else:
                return find_parent_method(par)

    # TODO: Find inherited attrs
    #classnode.inherit_from
    # inhertied_attrs = ['parent']
    # inhertied_attrs = []

    class_methods = []
    for node in classnode:
        if node.type == 'def':
            if only_init:
                if node.name == '__init__':
                    class_methods.append(node)
            else:
                class_methods.append(node)

    class_vars = []
    self_vars = []
    for method_node in class_methods:
        self_var = method_node.arguments[0].dumps()
        self_vars.append(self_var)
        for assign in method_node.find_all('assignment'):
            # method_node = find_parent_method(assign)
            if assign.target.dumps().startswith(self_var + '.'):
                class_vars.append(assign.target.value[1].dumps())
    static_attrs = ut.unique(class_vars)
    return static_attrs

    # class_members = ut.unique(class_vars + class_methods + inhertied_attrs)
    if False:
        self_var = self_vars[0]

        # Find everything that is used
        complex_cases = []
        simple_cases = []
        all_self_ref = classnode.find_all(
            'name_', value=re.compile('.*' + self_var + '\\.*'))
        for x in all_self_ref:
            if x.parent.type == 'def_argument':
                continue
            if x.parent.type == 'atomtrailers':
                atom = x.parent
                if ut.depth(atom.fst()) <= 3:
                    simple_cases.append(atom)
                else:
                    complex_cases.append(atom)
                #print(ut.depth(atom.value.data))
                #print(atom.value)
                #print(atom.dumps())
                #if len(atom.dumps()) > 200:
                #    break

        accessed_attrs = []
        for x in simple_cases:
            if x.value[0].dumps() == self_var:
                attr = x.value[1].dumps()
                accessed_attrs.append(attr)
        accessed_attrs = ut.unique(accessed_attrs)

        ut.setdiff(accessed_attrs, class_vars)
30214
def _import_class(self, class_path):
        
        LOGGER.debug('Importing %s', class_path)
        try:
            return utils.import_namespaced_class(class_path)
        except ImportError as error:
            LOGGER.critical('Could not import %s: %s', class_path, error)
            return None
945255
def init_app(cls, app, callback=None):
        
        processed = set()
        cls.__views__ = set()
        cls.is_always_available = False
        for base in cls.__mro__:
            for name, attr in base.__dict__.items():
                if name in processed:
                    continue
                processed.add(name)
                if isinstance(attr, ViewHandler):
                    if base != cls:  # Copy ViewHandler instances into subclasses
                        # TODO: Don't do this during init_app. Use a metaclass
                        # and do this when the class is defined.
                        attr = attr.copy_for_subclass()
                        setattr(cls, name, attr)
                    attr.__set_name__(cls, name)  # Required for Python < 3.6
                    cls.__views__.add(name)
                    attr.init_app(app, cls, callback=callback)
                    if not hasattr(attr.wrapped_func, 'is_available'):
                        cls.is_always_available = True
841709
function factoryObjectGraph(ParentClassGraph){/**
   * Inherited class. Class with methods for control links in graph.
   * Adapted for array collection.
   * 
   * @class
   * @description `import { ObjectGraph as Graph } from 'ancient-graph';`
   */var ObjectGraph=function(_ParentClassGraph){_inherits(ObjectGraph,_ParentClassGraph);/**
     * Construct new graph and checks for required adaptation methods.
     * @param {Array[]} collection
     * @param {Object.<string, string>} fields - matching of fields in the link with fields in document
     * @param {Object} [config] - Additional config.
     * @param {Object} [config.aliases]
     * @param {String} [config.aliases.$]
     * @throws {Error} if the adapter methods is not complete
     */function ObjectGraph(collection,fields,config){_classCallCheck(this,ObjectGraph);var _this=_possibleConstructorReturn(this,(ObjectGraph.__proto__||Object.getPrototypeOf(ObjectGraph)).apply(this,arguments));_this.emitter=new _fbemitter.EventEmitter;return _this}/**
     * Specifies the id field on insert
     * 
     * @param {number} index
     * @param {Link} link
     * @return {number|string} id;
     */_createClass(ObjectGraph,[{key:'_idGenerator',value:function _idGenerator(index,link){return''+index}},{key:'_insertModifier',/**
     * Generate insert modifier.
     * 
     * @param {number} index
     * @param {Link} link
     * @return {number|string} id;
     */value:function _insertModifier(link){var _modifier={};for(var f in link){if(this.fields[f]){_modifier[this.fields[f]]=link[this.config.aliases[f]]}}return _modifier}},{key:'insert',/**
     * Should insert new link into graph.
     * Return a synchronous result. This can be useful in your application. But for writing generic code, it is recommended to only use the callback result.
     * 
     * @param {Link} link
     * @param {Graph~insertCallback} [callback]
     * @param {Object} [context]
     * @return {number|string} [id]
     */value:function insert(link,callback,context){this.callback;var _modifier=this._insertModifier(link);var index,error,id;try{index=this.collection.push(_modifier)-1;if(!this.collection[index].hasOwnProperty(this.fields[this.config.aliases['id']])){id=this.collection[index][this.fields[this.config.aliases['id']]]=this._idGenerator(index,this.collection[index])}this.emitter.emit('insert',this.collection[index])}catch(_error){error=_error}if(callback){callback(error,id)}return id}/**
     * Optional callback. If present, called with an error object as the first argument and, if no error, the unique id of inserted link as the second.
     *
     * @callback Graph~insertCallback
     * @param {Error} [error]
     * @param {number|string} [id]
     *//**
     * Push into link value some item/items.
     * 
     * @param {Array} data
     * @param {string|number|string[]|number[]} item
     */},{key:'_updateModifierPush',value:function _updateModifierPush(data,item){data.push(item)}/**
     * Push into link value some item/items if not already exists.
     * 
     * @param {Array} data
     * @param {string|number|string[]|number[]} item
     */},{key:'_updateModifierAdd',value:function _updateModifierAdd(data,item){if(_lodash2.default.isArray(item)){for(var i in item){this._updateModifierAdd(data,item[i])}}else{var index=_lodash2.default.indexOf(data,item);if(index<0){this._updateModifierPush(data,item)}}}/**
     * Remove from link value some item/items.
     * 
     * @param {Array} data
     * @param {string|number|string[]|number[]} item
     */},{key:'_updateModifierRemove',value:function _updateModifierRemove(data,item){if(_lodash2.default.isArray(item)){for(var i in item){this._updateModifierRemove(data,item[i])}}else{_lodash2.default.remove(data,function(value){return value==item})}}/**
     * Generate update modifier.
     * 
     * @param {LinkModifier} modifier 
     * @param {Object} result
     * @return {number|string} id;
     */},{key:'_updateModifier',value:function _updateModifier(modifier,result){for(var m in modifier){if(this.fields[m]){if(typeof modifier[m]=='undefined'){delete result[this.fields[m]]}else{if(_typeof(modifier[m])=='object'){if(_lodash2.default.isArray(modifier[m])){result[this.fields[m]]=modifier[m]}else{if(!_lodash2.default.isArray(result[this.fields[m]])){result[this.fields[m]]=result[this.fields[m]]?[result[this.fields[m]]]:[]}for(var key in modifier[m]){if(key=='add'){this._updateModifierAdd(result[this.fields[m]],modifier[m][key])}if(key=='push'){this._updateModifierPush(result[this.fields[m]],modifier[m][key])}if(key=='remove'){this._updateModifierRemove(result[this.fields[m]],modifier[m][key])}}}}else{result[this.fields[m]]=modifier[m]}}}}}},{key:'update',/**
     * Should update to new state of modifier object link by unique id or by link query object.
     * If the database allows, it is recommended to return a synchronous result. This can be useful in your application. But for writing generic code, it is recommended to only use the callback result.
     * 
     * @param {string|LinkSelector} selector
     * @param {LinkModifier} modifier
     * @param {Graph~updateCallback} [callback]
     * @param {Object} [context]
     * @return {number} [count]
     */value:function update(selector,modifier,callback,context){var results=this._fetch(selector);for(var r in results){var oldResult=_lodash2.default.cloneDeep(results[r]);this._updateModifier(modifier,results[r]);this.emitter.emit('update',results[r],oldResult)}if(callback)callback(undefined,results.length);return results.length}/**
     * Optional callback. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.
     *
     * @callback Graph~updateCallback
     * @param {Error} [error]
     * @param {number} [count]
     *//**
     * Should remove link by unique id or by link query object.
     * 
     * @param {string|LinkSelector} selector
     * @param {Graph~removeCallback} [callback]
     * @param {Object} [context]
     */},{key:'remove',value:function remove(selector,callback,context){var _this2=this;var oldLength=this.collection.length;var removed=[];_lodash2.default.remove(this.collection,function(result){var _query=_this2.query(selector)(result);if(_query)removed.push(result);return _query});for(var r in removed){this.emitter.emit('remove',removed[r])}var newLength=this.collection.length;if(callback)callback(undefined,oldLength-newLength)}/**
     * Optional callback. If present, called with an error object as the first argument.
     *
     * @callback Graph~removeCallback
     * @param {Error} [error]
     * @param {number} [count]
     *//**
     * Generate adapter for database query for links search by unique id or by link query object.
     * 
     * @param {string|LinkSelector} selector
     * @return {*} query
     */},{key:'query',value:function query(selector){var _this3=this;var type=typeof selector==='undefined'?'undefined':_typeof(selector);if(type=='string'||type=='number'){return function(doc){return doc[_this3.fields[_this3.config.aliases['id']]]==selector}}else if(type=='object'){return function(doc){if((typeof doc==='undefined'?'undefined':_typeof(doc))!='object')return false;for(var m in selector){if(_this3.fields[m]){if(typeof selector[m]=='undefined'){if(doc.hasOwnProperty(_this3.fields[m]))return false}else{if(_lodash2.default.isArray(doc[_this3.fields[m]])){if(_lodash2.default.isArray(selector[m])){for(var s in selector[m]){if(!_lodash2.default.includes(doc[_this3.fields[m]],selector[m][s])){return false}}}else{if(!_lodash2.default.includes(doc[_this3.fields[m]],selector[m])){return false}}}else{if(doc[_this3.fields[m]]!=selector[m])return false}}}}return true}}}/**
     * Generate adapted for database options object.
     * 
     * @param {Object} [options]
     * @return {*} options - a options suitable for the database
     */},{key:'options',value:function options(_options2){var _options={};if(_options2){if(_options2.sort){_options.sort={keys:[],orders:[]};for(var s in _options2.sort){if(this.fields[s]){_options.sort.keys.push(this.fields[s]);_options.sort.orders.push(_options2.sort[s]?'asc':'desc')}}}if(typeof _options2.skip=='number'){_options.skip=_options2.skip}if(typeof _options2.limit=='number'){_options.limit=_options2.limit}}return _options}/**
     * Generate Link from document by fields.
     * 
     * @param {Object} document
     * @return {Link} link
     */},{key:'_generateLink',value:function _generateLink(document){var link={};for(var f in this.fields){if(document.hasOwnProperty(this.fields[f])){link[f]=document[this.fields[f]]}}return link}/**
     * Get one first matching link.
     * 
     * @param {string|LinkSelector} selector
     * @param {SelectOptions} [options]
     * @param {Graph~getCallback} [callback]
     * @return {Link} link - result link object
     */},{key:'get',value:function get(selector,options,callback){var results=this.fetch(selector,options,function(error,results){if(callback)callback(error,results?results[0]:undefined)});if(results)return results[0]}/**
     * Fetch native database documents.
     * 
     * @param {string|linkSelector} selector
     * @param {SelectOptions} [options]
     * @return {Object[]} documents - result documents
     */},{key:'_fetch',value:function _fetch(selector,options){var query=this.query(selector);var documents=_lodash2.default.filter(this.collection,query);var _options=this.options(options);if(_options.sort)documents=_lodash2.default.orderBy(documents,_options.sort.keys,_options.orders);var skip=_options.skip?_options.skip:0;var limit=_options.limit?skip+_options.limit:_options.limit;documents=documents.slice(skip,limit);return documents}/**
     * Find and all matching links as an Array.
     * 
     * @param {string|LinkSelector} selector
     * @param {SelectOptions} [options]
     * @param {Graph~fetchCallback} [callback]
     * @return {Link[]} links - result links objects in array
     */},{key:'fetch',value:function fetch(selector,options,callback){var documents=this._fetch(selector,options);var links=[];for(var d in documents){links.push(this._generateLink(documents[d]))}if(callback)callback(undefined,links);return links}/**
     * Optional callback. If present, called with an error object as the first argument and, if no error, the result links objects in array.
     *
     * @callback Graph~fetchCallback
     * @param {Error} [error]
     * @param {Link[]} [links]
     *//**
     * Should call callback once for each matching document, sequentially and synchronously.
     * 
     * @param {string|LinkSelector} selector
     * @param {SelectOptions} [options]
     * @param {Graph~eachCallback} [callback]
     */},{key:'each',value:function each(selector,options,callback){var links=this.fetch(selector,options);for(var l in links){callback(links[l])}}/**
     * @callback Graph~eachCallback
     * @param {Link} [link]
     *//**
     * Map callback over all matching documents. Returns an Array.
     * 
     * @param {string|LinkSelector} selector
     * @param {SelectOptions} [options]
     * @param {Graph~mapCallback} [callback]
     * @return {Array} results
     */},{key:'map',value:function map(selector,options,callback){var links=this.fetch(selector,options);return links.map(callback)}/**
     * @callback Graph~mapCallback
     * @param {Link} [link]
     * @return {*} result
     *//**
     * Count all matching documents.
     * 
     * @param {string|LinkSelector} selector
     * @param {SelectOptions} [options]
     * @param {Graph~countCallback} [callback]
     * @return {number} [count]
     */},{key:'count',value:function count(selector,options,callback){var links=this.fetch(selector,options);if(callback)callback(undefined,links.length);return links.length}/**
     * @callback Graph~countCallback
     * @param {Error} [error]
     * @param {number} [count]
     *//**
     * Should subscribe to the events: link, unlink, insert, update, remove.
     * 
     * @param {string} event - One event name
     * @param {Graph~onCallback} callback
     * @returns {Function} Stops event subscription.
     * @example
     * var counter = 0;
     * var stop = graph.on('update', (oldData, newData) => {
     *   if (oldData.id == '1') console.log(oldData.id, 'is changed');
     *   counter++;
     *   if (counter == 3) stop();
     * });
     */},{key:'on',value:function on(event,callback){var _this4=this;var subscriptions=[];if(event=='insert'){subscriptions.push(this.emitter.addListener('insert',function(document){callback(undefined,_this4._generateLink(document))}))}if(event=='update'){subscriptions.push(this.emitter.addListener('update',function(newDocument,oldDocument){callback(_this4._generateLink(oldDocument),_this4._generateLink(newDocument))}))}if(event=='remove'){subscriptions.push(this.emitter.addListener('remove',function(document){callback(_this4._generateLink(document),undefined)}))}if(event=='link'){subscriptions.push(this.emitter.addListener('insert',function(document){callback(undefined,_this4._generateLink(document))}));subscriptions.push(this.emitter.addListener('update',function(newDocument,oldDocument){callback(_this4._generateLink(oldDocument),_this4._generateLink(newDocument))}))}if(event=='unlink'){subscriptions.push(this.emitter.addListener('update',function(newDocument,oldDocument){callback(_this4._generateLink(oldDocument),_this4._generateLink(newDocument))}));subscriptions.push(this.emitter.addListener('remove',function(document){callback(_this4._generateLink(document),undefined)}))}return function(){var _iteratorNormalCompletion=true;var _didIteratorError=false;var _iteratorError=undefined;try{for(var _iterator=subscriptions[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var subscription=_step.value;subscription.remove()}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}}}/**
     * @callback Graph~onCallback
     * @param {Link} [oldLink] - can be undefined on link and insert events
     * @param {Link} [newLink] - can be undefined on unlink and remove events
     * @param {Object} [context] - additional app information, such as context.userId
     */}]);return ObjectGraph}(ParentClassGraph);return ObjectGraph}
829524
function factoryGraph(ParentClass) {
  
  if (!ParentClass) {
    var ParentClass = class {}
  }
  
  /**
   * Class to inherit. Class with methods for control links in graph.
   * Must be completed for adaptation to a particular database.
   * 
   * @class
   * @description `import { Graph } from 'ancient-graph';`
   */
  class Graph extends ParentClass {
    
    /**
     * Construct new graph and checks for required adaptation methods.
     * @throws {Error} if the adapter methods is not complete
     * 
     * @param {} collection - A pointer to the collection dannymineobhodimye daapteru to work with the graph. This may be a connection to the SQL database and table name, for example, or a collection of Mongo. 
     * @param {Object.<string, string>} fields - Comparison of the data in the collection of data in the graph. It is necessary for the adapter.
     * @param {Object} [config] - Additional config.
     * @param {Object} [config.aliases]
     * @param {String} [config.aliases.$]
     */
    constructor(collection, fields, config) {
      super(...arguments);
      this.collection = collection;
      this.fields = fields;
      if (typeof(config) != 'object') var config = {};
      this.config = config;
      if (typeof(config.aliases) != 'object') config.aliases = {};
      for (var f in fields) {
        if (!config.aliases[f]) config.aliases[f] = f;
      }
      this.config._aliases = {};
      for (var a in this.config.aliases) {
        this.config._aliases[this.config.aliases[a]] = a;
      }
      if (this.insert == Graph.prototype.insert) {
        throw new Error('Method `insert` is not adapted.');
      }
      if (this.update == Graph.prototype.update) {
        throw new Error('Method `update` is not adapted.');
      }
      if (this.remove == Graph.prototype.remove) {
        throw new Error('Method `remove` is not adapted.');
      }
      if (this.query == Graph.prototype.query) {
        throw new Error('Method `query` is not adapted.');
      }
      if (this.options == Graph.prototype.options) {
        throw new Error('Method `options` is not adapted.');
      }
      if (this.fetch == Graph.prototype.fetch) {
        throw new Error('Method `fetch` is not adapted.');
      }
      if (this.get == Graph.prototype.get) {
        throw new Error('Method `get` is not adapted.');
      }
      if (this.each == Graph.prototype.each) {
        throw new Error('Method `each` is not adapted.');
      }
      if (this.map == Graph.prototype.map) {
        throw new Error('Method `map` is not adapted.');
      }
      if (this.count == Graph.prototype.count) {
        throw new Error('Method `count` is not adapted.');
      }
      if (this.on == Graph.prototype.on) {
        throw new Error('Method `on` is not adapted.');
      }
    }
    
    /**
     * Should insert new link into graph.
     * If the database allows, it is recommended to return a synchronous result. This can be useful in your application. But for writing generic code, it is recommended to only use the callback result.
     * 
     * @param {Link} link
     * @param {Graph~insertCallback} [callback]
     * @param {Object} [context]
     * @return {string} [id]
     */
    insert(link, callback, context) {}
    
    /**
     * Optional callback. If present, called with an error object as the first argument and, if no error, the unique id of inserted link as the second.
     *
     * @callback Graph~insertCallback
     * @param {Error} [error]
     * @param {string} [id]
     */
    
    /**
     * Should update to new state of modifier object link by unique id or by link query object.
     * If the database allows, it is recommended to return a synchronous result. This can be useful in your application. But for writing generic code, it is recommended to only use the callback result.
     * 
     * @param {string|LinkSelector} selector
     * @param {LinkModifier} modifier
     * @param {Graph~updateCallback} [callback]
     * @param {Object} [context]
     * @return {number} [count]
     */
    update(selector, modifier, callback, context) {}
    
    /**
     * Optional callback. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.
     *
     * @callback Graph~updateCallback
     * @param {Error} [error]
     * @param {number} [count]
     */
    
    /**
     * Should remove link by unique id or by link query object.
     * 
     * @param {string|LinkSelector} selector
     * @param {Graph~removeCallback} [callback]
     * @param {Object} [context]
     */
    remove(selector, callback, context) {}
    
    /**
     * Optional callback. If present, called with an error object as the first argument.
     *
     * @callback Graph~removeCallback
     * @param {Error} [error]
     * @param {number} [count]
     */
    
    /**
     * Should generate adapter for database query for links search by unique id or by link query object.
     * 
     * @param {string|LinkSelector} selector
     * @return {*} query
     */
    query(selector) {}
    
    /**
     * Should generate adapter for database options. 
     * 
     * @param {Object} [options]
     * @return {*} options - a options suitable for the database
     */
    options(options) {}
    
    /**
     * Find and all matching links as an Array.
     * 
     * @param {string|LinkSelector} selector
     * @param {SelectOptions} [options]
     * @param {Graph~fetchCallback} [callback]
     * @return {Link[]} links - result links objects in array
     */
    fetch(selector, options, callback) {}
    
    /**
     * Optional callback. If present, called with an error object as the first argument and, if no error, the result links objects in array.
     *
     * @callback Graph~fetchCallback
     * @param {Error} [error]
     * @param {Link[]} [links]
     */
    
    /**
     * Get one first matching link.
     * 
     * @param {string|LinkSelector} selector
     * @param {SelectOptions} [options]
     * @param {Graph~getCallback} [callback]
     * @return {Link} link - result link object
     */
    get(selector, options, callback) {}
    
    /**
     * Optional callback. If present, called with an error object as the first argument and, if no error, the result link object.
     *
     * @callback Graph~getCallback
     * @param {Error} [error]
     * @param {Link} [link]
     */
    
    /**
     * Should call callback once for each matching document, sequentially and synchronously.
     * 
     * @param {string|LinkSelector} selector
     * @param {SelectOptions} [options]
     * @param {Graph~eachCallback} [callback]
     */
    each(selector, options, callback) {}
    
    /**
     * @callback Graph~eachCallback
     * @param {Link} [link]
     */
    
    /**
     * Should map callback over all matching documents. Returns an Array.
     * 
     * @param {string|LinkSelector} selector
     * @param {SelectOptions} [options]
     * @param {Graph~mapCallback} [callback]
     * @return {Array} results
     */
    map(selector, options, callback) {}
    
    /**
     * @callback Graph~mapCallback
     * @param {Link} [link]
     * @return {*} result
     */
    
    /**
     * Should count all matching documents.
     * 
     * @param {string|LinkSelector} selector
     * @param {SelectOptions} [options]
     * @param {Graph~countCallback} [callback]
     * @return {number} [count]
     */
    count(selector, options, callback) {}
    
    /**
     * @callback Graph~countCallback
     * @param {Error} [error]
     * @param {number} [count]
     */
    
    /**
     * Should subscribe to the events: link, unlink, insert, update, remove.
     * 
     * @param {string} event - One event name
     * @param {Graph~onCallback} callback
     * @returns {Function} Stops event subscription.
     * @example
     * var counter = 0;
     * var stop = graph.on('update', (oldData, newData) => {
     *   if (oldData.id == '1') console.log(oldData.id, 'is changed');
     *   counter++;
     *   if (counter == 3) stop();
     * });
     */
    on(event, callback) {}
    
    /**
     * @callback Graph~onCallback
     * @param {Link} [oldLink] - can be undefined on link and insert events
     * @param {Link} [newLink] - can be undefined on unlink and remove events
     * @param {Object} [context] - additional app information, such as context.userId
     */
  };
  
  return Graph;
}
887268
function checkClass(i) {
  let l;

  if (i >= tokensLength) return 0;

  if (tokens[i].class_l) return tokens[i].class_l;

  if (tokens[i++].type === TokenType.FullStop) {
    if (l = checkInterpolatedVariable(i)) tokens[i].class_child = 1;
    else if (l = checkIdent(i)) tokens[i].class_child = 2;
    else return 0;

    tokens[i].class_l = l + 1;
    return l + 1;
  }

  return 0;
}
1242891
def classview_for(self, action='view'):
        
        app = current_app._get_current_object()
        return self.view_for_endpoints[app][action][0](self)
936954
static Class<?> findViewClass(Context context, String name)
            throws ClassNotFoundException {
        if (name.indexOf('.') >= 0) {
            return loadViewClass(context, name);
        }

        for (String prefix : VIEW_CLASS_PREFIX_LIST) {
            try {
                return loadViewClass(context, prefix + name);
            } catch (ClassNotFoundException e) {
                continue;
            }
        }

        throw new ClassNotFoundException("Couldn't load View class for " + name);
    }
21388
def from_context(cls):
        
        try:
            ctx = click.get_current_context()
        except RuntimeError:
            return cls()
        return ctx.find_object(cls)
15768
def _resolve_class(self, clazz: Any) -> object:
        
        arguments = {}
        if hasattr(clazz.__init__, '__annotations__'):
            annotations = clazz.__init__.__annotations__
            for name, type_hint in annotations.items():
                if name != 'return':
                    arguments[name] = self.resolve(type_hint)
        return clazz(**arguments)
1160351
def data_objet_class(data_mode='value', time_mode='framewise'):
    
    classes_table = {('value', 'global'): GlobalValueObject,
                     ('value', 'event'): EventValueObject,
                     ('value', 'segment'): SegmentValueObject,
                     ('value', 'framewise'): FrameValueObject,
                     ('label', 'global'): GlobalLabelObject,
                     ('label', 'event'): EventLabelObject,
                     ('label', 'segment'): SegmentLabelObject,
                     ('label', 'framewise'): FrameLabelObject}

    try:
        return classes_table[(data_mode, time_mode)]
    except KeyError as e:
        raise ValueError('Wrong arguments')
580405
def HasOutputClass(cls, name):
    
    if not isinstance(name, py2to3.STRING_TYPES):
      return False

    return name.lower() in cls._output_classes
465778
def setPageObject(className)
      if @pageObjectClassNameSpecified
        raise ParseException("Page object class name specified more than once")
      end
      @pageObjectClassNameSpecified = className
      pageObjectClass = classFromString(className)
      initializePageObject(pageObjectClass.new)
    end
695956
Object getClassInstance() throws UtilEvalError {
        if (this.classInstance != null)
            return this.classInstance;
        if (this.classStatic != null
        // || (getParent()!=null && getParent().classStatic != null)
       )
            throw new UtilEvalError(
                    "Can't refer to class instance from static context.");
        else
            throw new InterpreterError(
                    "Can't resolve class instance 'this' in: " + this);
    }
315555
def import_class(class_path):
    '''
        
    '''
    module_name, class_name = class_path.rsplit(".", 1)
    module = import_module(module_name)
    claz = getattr(module, class_name)
    return claz
1337839
def as_widget(self, widget=None, attrs=None, only_initial=False):
        
        attrs = attrs or {}
        attrs.update(self.form.get_widget_attrs(self))
        if hasattr(self.field, 'widget_css_classes'):
            css_classes = self.field.widget_css_classes
        else:
            css_classes = getattr(self.form, 'widget_css_classes', None)
        if css_classes:
            attrs.update({'class': css_classes})
        widget_classes = self.form.fields[self.name].widget.attrs.get('class', None)
        if widget_classes:
            if attrs.get('class', None):
                attrs['class'] += ' ' + widget_classes
            else:
                attrs.update({'class': widget_classes})
        return super(NgBoundField, self).as_widget(widget, attrs, only_initial)
1076246
def object_symbol
      class_name = self.class.name
      index = class_name.rindex(/::/)
      class_name[index + 2 .. -1].underscore.to_sym
    end