Refer to parent class documentation.
438223
def _apply_gradients(self, grads, x, optim_state):
    """"""
    new_x = [None] * len(x)
    new_optim_state = {
        "t": optim_state["t"] + 1.,
        "m": [None] * len(x),
        "u": [None] * len(x)
    }
    t = new_optim_state["t"]
    for i in xrange(len(x)):
      g = grads[i]
      m_old = optim_state["m"][i]
      u_old = optim_state["u"][i]
      new_optim_state["m"][i] = (
          self._beta1 * m_old + (1. - self._beta1) * g)
      new_optim_state["u"][i] = (
          self._beta2 * u_old + (1. - self._beta2) * g * g)
      m_hat = new_optim_state["m"][i] / (1. - tf.pow(self._beta1, t))
      u_hat = new_optim_state["u"][i] / (1. - tf.pow(self._beta2, t))
      new_x[i] = (
          x[i] - self._lr * m_hat / (tf.sqrt(u_hat) + self._epsilon))
    return new_x, new_optim_state
1135100
def parent(self):
        
        if self == root or self == empty:
            raise NoParent
        return Name(self.labels[1:])
61630
def callback_parent(attr, old, new):
    ''''''
    import os

    # Remove accidental white space if copy/pasted
    new = new.strip()
    parent_input.value = new

    # Verify new parent path exists and update `datadirs_select` widget
    if os.path.exists(new):
        # Create sorted list of data directories, ignore files
        joinisdir = lambda parent, d: os.path.isdir(os.path.join(parent, d))
        options = sorted([d for d in os.listdir(new) if joinisdir(new, d)])

        # Update dropdown list of available data directories and select first
        datadirs_select.options = options
        datadirs_select.value = options[0]
        callback_datadirs('value', options[0], options[0])

    else:
        msg = '''
              The parent path `{}` does not exist.

              Check that you have entered the absolute path.
              '''.format(new)
        output_window.text = output_template.format(msg)

    return None
1044640
def _improve_class_docs(app, cls, lines):
    """"""
    if issubclass(cls, models.Model):
        _add_model_fields_as_params(app, cls, lines)
    elif issubclass(cls, forms.Form):
        _add_form_fields(cls, lines)
263460
def get_class_doc(klass, config=default_config):
    """"""
    if config.exclude_class:
        for ex in config.exclude_class:
            if ex.match(klass.__name__):
                return None

    nested_doc = []
    class_dict = klass.__dict__

    for item in dir(klass):
        if item in class_dict.keys():
            appended = None
            if isinstance(class_dict[item], type) and config.nested_class:
                appended = get_class_doc(class_dict[item], config)
            elif isinstance(class_dict[item], types.FunctionType):
                appended = get_function_doc(class_dict[item], config)
            if appended is not None:
                nested_doc.append(appended)

    return _doc_object(klass, 'class', nested_doc, config)
869466
def parent(self, key):
        """"""
        parent_key = '.'.join(key.split('.')[:-1])
        if not parent_key:
            return None
        else:
            return self[parent_key]
559472
def pclink(self, parent, child):
    """"""
    if parent._children is None:
      parent._children = set()
    if child._parents is None:
      child._parents = set()
    parent._children.add(child)
    child._parents.add(parent)
173127
def _lookup_parent(self, cls):
        """"""
        codeobj = self.parent
        while codeobj is not None and not isinstance(codeobj, cls):
            codeobj = codeobj.parent
        return codeobj
124184
def get_node_parent_class(node):
    """"""

    while node.parent:  # pragma no branch
        if isinstance(node, ClassDef):
            return node

        node = node.parent
260845
def data_parent(self) -> Optional["InternalNode"]:
        """"""
        parent = self.parent
        while parent:
            if isinstance(parent, DataNode):
                return parent
            parent = parent.parent
678111
def parent(self):
        
        parent_impl_node = self.adapter.get_node_parent(self.impl_node)
        return self.adapter.wrap_node(
            parent_impl_node, self.adapter.impl_document, self.adapter)
938009
def parent(self):
        """"""
        drv = self._drv
        root = self._root
        parts = self._parts
        if len(parts) == 1 and (drv or root):
            return self
        return self._from_parsed_parts(drv, root, parts[:-1])
394979
def inherit_doc(cls):
    
    for name, func in vars(cls).items():
        # only inherit docstring for public functions
        if name.startswith("_"):
            continue
        if not func.__doc__:
            for parent in cls.__bases__:
                parent_func = getattr(parent, name, None)
                if parent_func and getattr(parent_func, "__doc__", None):
                    func.__doc__ = parent_func.__doc__
                    break
    return cls
1105241
def _closure_parent_pk(self):
        """"""
        if hasattr(self, "%s_id" % self._closure_parent_attr):
            return getattr(self, "%s_id" % self._closure_parent_attr)
        else:
            parent = getattr(self, self._closure_parent_attr)
            return parent.pk if parent else None
1320913
def get_parent(self):
        """"""

        parent_iter = self.model.iter_parent(self.iter)
        if parent_iter:
            return TreeModelRow(self.model, parent_iter)
927855
def get_class_list(cls) -> DOMTokenList:
        """"""
        cl = []
        cl.append(DOMTokenList(cls, cls.class_))
        if cls.inherit_class:
            for base_cls in cls.__bases__:
                if issubclass(base_cls, WdomElement):
                    cl.append(base_cls.get_class_list())
        # Reverse order so that parent's class comes to front  <- why?
        cl.reverse()
        return DOMTokenList(cls, *cl)
449049
def _subclass_container(self):
        
        _parent_class = self

        class GetWrapper(Get):

            def __init__(self):
                self._parent_class = _parent_class

        class PostWrapper(Post):

            def __init__(self):
                self._parent_class = _parent_class

        class PutWrapper(Put):

            def __init__(self):
                self._parent_class = _parent_class

        class PatchWrapper(Patch):

            def __init__(self):
                self._parent_class = _parent_class

        class DeleteWrapper(Delete):

            def __init__(self):
                self._parent_class = _parent_class

        class InteractiveWrapper(Interactive):

            def __init__(self):
                self._parent_class = _parent_class

        return {"get": GetWrapper,
                "post": PostWrapper,
                "put": PutWrapper,
                "patch": PatchWrapper,
                "delete": DeleteWrapper,
                "interactive": InteractiveWrapper}