Return the currently active :class:`~opentracing.Scope` which
        can be used to access the currently active
        :attr:`Scope.span`.

        :return: the :class:`~opentracing.Scope` that is active,
            or ``None`` if not available.
495158
def active(self):
        

        context = self._get_context()
        if not context:
            return super(TornadoScopeManager, self).active

        return context.active
566479
def check_scope(scope = nil)
      # If no scope is requested or the change has no scope include this change unchanged
      return self unless scope
      change_scope = /^\s*\[\w+\]/.match(@note)
      return self unless change_scope

      # change_scope is a string of format `[scope]`, need to strip the `[]` to compare the scope
      if change_scope[0][1..-2] == scope
        #  Change has the scope that is requested, strip the whole scope scope from the change note
        @note = change_scope.post_match.strip
        return self
      else
        #  Change has a different scope than requested
        return nil
      end
    end
1294395
def current(self):
        
        results = self._timeline.find_withtag(tk.CURRENT)
        return results[0] if len(results) != 0 else None
88523
def active_pt_window(self):
        "  "
        if self.active_tab:
            w = self.active_tab.active_window
            if w:
                return w.pt_window
115268
def get_scope_path(cls, scope_separator="::"):
        
        if cls.get_parent_scope() is None:
            return ""
        elif isinstance(cls.get_parent_scope(), comp.Root):
            return ""
        else:
            parent_path = cls.get_parent_scope().get_scope_path(scope_separator)
            if parent_path:
                return(
                    parent_path
                    + scope_separator
                    + cls.get_parent_scope().type_name
                )
            else:
                return cls.get_parent_scope().type_name
801075
def active(self):
        """"""
        # TODO avoid direct usage of transport object.
        marks = tuple(int(x) for x in transport.ask('MACT').split(','))
        return marks[1:]
917196
private Span startTracing(String spanName) {
        if (!environment.operationTracingEnabled()) {
            return null;
        }
        Scope scope = environment.tracer()
            .buildSpan(spanName)
            .startActive(false);
        Span parent = scope.span();
        scope.close();
        return parent;
    }
113129
def get(self):
        ''''''
        if self._current:
            return self._resume(self._current, False)
        else:
            return self._get(None)
1284510
def get_scopes(self):
        
        if not self.authenticated:
            raise ValueError("Must authenticate() as a client first.")

        scope = self.client['scope']
        return scope.split()
259667
def get_current_name_scope():
  """"""
  # pylint: disable=protected-access
  g = tf.get_default_graph()
  # TODO(eiderman): Remove this hack once TF update is released.
  if isinstance(g._name_stack, tuple):
    return g._name_stack[0] + '/'
  else:
    return g._name_stack + '/'
897947
public function getCurrentScope()
    {
        $key = request(Scope::QUERY_NAME);

        return $this->scopes->first(function ($scope) use ($key) {
            return $scope->key == $key;
        });
    }
1288095
def current_scope(klass = nil)
      if klass && Thread.current[CURRENT_SCOPE_KEY].respond_to?(:keys)
        Thread.current[CURRENT_SCOPE_KEY][
            Thread.current[CURRENT_SCOPE_KEY].keys.find { |k| k <= klass }
        ]
      else
        Thread.current[CURRENT_SCOPE_KEY]
      end
    end
585788
def currentItem( self ):
        
        model = self.navigationModel()
        if ( not model ):
            return None
        
        return model.itemByPath(self.text())
399533
def active(self):
        
        return {key: value for key, value in self.conns.items()
                if value.active}
514711
def start_span(self, name='span'):
        
        parent_span = self.current_span()

        # If a span has remote parent span, then the parent_span.span_id
        # should be the span_id from the request header.
        if parent_span is None:
            parent_span = base.NullContextManager(
                span_id=self.span_context.span_id)

        span = trace_span.Span(
            name,
            parent_span=parent_span,
            context_tracer=self)
        with self._spans_list_condition:
            self._spans_list.append(span)
        self.span_context.span_id = span.span_id
        execution_context.set_current_span(span)
        span.start()
        return span
1139946
def get_current_line(self):
        """"""
        cursor = self.textCursor()
        cursor.select(QTextCursor.BlockUnderCursor)
        return to_text_string(cursor.selectedText())
169304
def is_in_scope(cls, want_scope: str, have_scopes: List[Scope]) -> bool:
        
        if not want_scope:
            return True
        if want_scope in have_scopes or want_scope.split(':')[0] in have_scopes:
            return True
        elif want_scope.startswith('read'):
            return cls.is_in_scope(want_scope.replace('read', 'write'), have_scopes)
        elif want_scope.startswith('write'):
            return cls.is_in_scope(want_scope.replace('write', 'admin'), have_scopes)
        else:
            return False