See parent method for documentation
17500
def getMessageCharge(self, apiMsgId):
        
        content = self.parseRest(self.request('rest/message/' + apiMsgId))

        return {
            'id': apiMsgId,
            'status': content['messageStatus'].encode('utf-8'),
            'description': self.getStatus(content['messageStatus']),
            'charge': float(content['charge'])
        }
9114
def find_method_module(methodname, ancestors)
      methodname = methodname.to_s
      ancestors.each do |a|
        begin
          a.instance_method(methodname)
          return a
        rescue NameError
        end
      end
      nil
    end
263828
def parent(self):
        
        if len(self._path) == 1:
            return None
        else:
            parent_path = self._path[:-1]
        return self._client.document(*parent_path)
237489
def parent(version=None, include=None):
    '''
    
    '''
    parser = argparse.ArgumentParser(add_help=False)
    add_default_args(parser, version=version, include=include)
    return parser
921234
def parse_parent(docname):
    

    lineage = docname.split('/')
    lineage_count = len(lineage)

    if docname == 'index':
        # This is the top of the Sphinx project
        parent = None
    elif lineage_count == 1:
        # This is a non-index doc in root, e.g. about
        parent = 'index'
    elif lineage_count == 2 and lineage[-1] == 'index':
        # This is blog/index, parent is the root
        parent = 'index'
    elif lineage_count == 2:
        # This is blog/about
        parent = lineage[0] + '/index'
    elif lineage[-1] == 'index':
        # This is blog/sub/index
        parent = '/'.join(lineage[:-2]) + '/index'
    else:
        # This should be blog/sub/about
        parent = '/'.join(lineage[:-1]) + '/index'

    return parent
526137
void showParentFolder() {

        CmsUUID parentId = (CmsUUID)m_treeContainer.getParent(m_currentFolder);
        if (parentId != null) {
            Item resourceItem = m_treeContainer.getItem(parentId);
            if ((resourceItem.getItemProperty(CmsResourceTableProperty.PROPERTY_DISABLED).getValue() == null)
                || !((Boolean)resourceItem.getItemProperty(
                    CmsResourceTableProperty.PROPERTY_DISABLED).getValue()).booleanValue()) {
                // don't open disabled parent folders
                try {
                    readFolder(parentId);
                    m_fileTree.select(parentId);
                } catch (CmsException e) {
                    CmsErrorDialog.showErrorDialog(
                        CmsVaadinUtils.getMessageText(Messages.ERR_EXPLORER_CAN_NOT_READ_RESOURCE_1, parentId),
                        e);
                    LOG.error(e.getLocalizedMessage(), e);
                }
            }
        }
    }
456092
function getParams(spec_c, details, method, parent) {
  var spec_js = {};
  _.each(spec_c, function(param) {
    try {
      var paramType = getType(getText(getChild(param, 'type'), 'type'), parent);
      var paramName = getText(getChild(param, 'declname'), 'name');
      spec_js[paramName] = { type: paramType };
    } catch(e) {
      if (paramType == '...') {
        spec_js['arguments'] = { type: paramType };
      } else {
        throw e;
      }
    }
  });
  _.each(details, function(param) {
    var getParamName = function(p) { return getText(getChild(getChild(p, 'parameternamelist'), 'parametername'), 'name'); }
    var paramName = getParamName(param);
    var paramDescription = getText(getChild(param, 'parameterdescription'), 'description');
    if (_.has(spec_js, paramName)) {
      spec_js[paramName].description = paramDescription;
    } else {
      var msg = ' has documentation for an unknown parameter: ' + paramName + '. ';
      var suggestions = _.difference(_.keys(spec_js), _.map(details, getParamName));
      var msgAddendum = (!_.isEmpty(suggestions) ? ('Did you mean ' + suggestions.join(', or ') + '?') : '');
      console.log('Warning: ' + (parent ? (parent + '.') : '') + method + msg + msgAddendum);
    }
  });
  return spec_js;
}
420888
function Documentation() {
  return {
    composes: [],
    descriptors: {},
    getPropDescriptor(name) {
      return this.descriptors[name] || (this.descriptors[name] = {});
    },
    addComposes(name) {
      this.composes.push(name);
    },
    set(key, value) {
      this[key] = value;
    },
  };
}
356712
def get_parents(obj, **kwargs):
    """"""
    num_of_mro = kwargs.get("num_of_mro", 5)

    mro = getmro(obj.__class__)
    mro_string = ', '.join([extract_type(str(t)) for t in mro[:num_of_mro]])

    return "Hierarchy: {}".format(mro_string)
1114413
def check_public_methods(method, parent)
      return if !method || !parent
      @@public_methods.each{ |alias_item|
        parent_is_used_module = nil
        alias_item["used_modules"].each{ |used_module|
          if used_module == parent ||
              used_module.upcase == parent.upcase &&
              @options.ignore_case
            parent_is_used_module = true
          end
        }
        next if !parent_is_used_module

        if method.name == alias_item["name"] ||
            method.name.upcase == alias_item["name"].upcase &&
            @options.ignore_case

          new_meth = initialize_public_method(method, parent)
          if alias_item["local_name"]
            new_meth.name = alias_item["local_name"]
          end

          progress "e"
          @stats.num_methods += 1
          alias_item["file_or_module"].add_method new_meth
        end
      }
    end
439230
function getAPIDescriptionElems(){
	var resp = $('.documentation__routes');
	var namespaces = _.map(resp.children(), function(sectionChild){
		var namespace = {
			name: sectionChild.attribs.id.replace(/\s/, ''),
		};
		var methodDescWrapElems = _.map(sectionChild.children, function(child, i){
			if(child.attribs && child.attribs.class && utils.hasClass('toc-el', child.attribs.class)){
				return child; 	
			}
		});
		namespace.el = _.compact(methodDescWrapElems);
		return namespace;
	});
	return namespaces;
}
1056785
function getStatementParent() {
  var path = this;

  do {
    if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
      break;
    } else {
      path = path.parentPath;
    }
  } while (path);

  if (path && (path.isProgram() || path.isFile())) {
    throw new Error("File/Program node, we can't possibly find a statement parent to this");
  }

  return path;
}
920531
def collect_methods
            list = @context.method_list
            unless @options.show_all
                list = list.find_all {|m| m.visibility == :public || m.visibility == :protected || m.force_documentation }
            end
            @methods = list.collect {|m| HtmlMethod.new(m, self, @options) }
        end
1026631
def _show_documentation(self):
        
        documents = []
        for key, document in self.app.documents.get().items():
            if key != "main":
                documents.append((key, document))
        documents = sorted(documents, key=lambda x: x[0])
        main = self.app.documents.get("main")
        if main is not None:
            documents.insert(0, (main.name, main))

        user_answer = ""
        index = 0
        while user_answer != "X":
            if index < 0:
                index = 0
            if index > len(documents) - 1:
                index = len(documents) - 1
            document = documents[index][1]

            os.system('cls' if os.name == 'nt' else 'clear')
            echo(Environment().from_string(document.content).render(app=self.app, plugin=document.plugin))

            source = "This document is registered by '%s' under the name '%s'" % (document.plugin.name, document.name)
            echo("-" * len(source))
            echo(source)
            echo("-" * len(source))
            commands = "Actions: "
            if index < len(documents) - 1:
                commands += "[N]ext, "
            if index > 0:
                commands += "[P]revious, "
            commands += "E[x]it"
            echo(commands)

            if index < len(documents) - 1:
                default = "N"
            elif index > 0:
                default = "P"
            else:
                default = "X"
            user_answer = prompt("Select your action", default=default).upper()

            if user_answer == "N":
                index += 1
            elif user_answer == "P":
                index -= 1
1132566
function getParents(tokens, options) {
    var parentName = tokens.parent,
      parentFiles = [],
      parents = [],
      parentFile,
      parent,
      l;

    while (parentName) {
      if (!options || !options.filename) {
        throw new Error('Cannot extend "' + parentName + '" because current template has no filename.');
      }

      parentFile = parentFile || options.filename;
      parentFile = self.options.loader.resolve(parentName, parentFile);
      parent = cacheGet(parentFile, options) || self.parseFile(parentFile, utils.extend({}, options, { filename: parentFile }));
      parentName = parent.parent;

      if (parentFiles.indexOf(parentFile) !== -1) {
        throw new Error('Illegal circular extends of "' + parentFile + '".');
      }
      parentFiles.push(parentFile);

      parents.push(parent);
    }

    // Remap each parents'(1) blocks onto its own parent(2), receiving the full token list for rendering the original parent(1) on its own.
    l = parents.length;
    for (l = parents.length - 2; l >= 0; l -= 1) {
      parents[l].tokens = remapBlocks(parents[l].blocks, parents[l + 1].tokens);
      importNonBlocks(parents[l].blocks, parents[l].tokens);
    }

    return parents;
  }
28865
def get_parent_data(tree, node, current):
        
        if not current:
            current = []

        parent = tree.parent(node.identifier)
        if parent.is_root():
            return current

        current.insert(0, (parent.tag, parent.data))
        return PlateManager.get_parent_data(tree, parent, current)
474995
def parent(self, parent_object, limit_parent_language=True):
        
        return self.all().parent(parent_object, limit_parent_language)