Handle uses statement.
772928
def _uses_stmt(self, stmt: Statement, sctx: SchemaContext) -> None:
        """"""
        if not sctx.schema_data.if_features(stmt, sctx.text_mid):
            return
        grp, gid = sctx.schema_data.get_definition(stmt, sctx)
        if stmt.find1("when"):
            sn = GroupNode()
            self._add_child(sn)
        else:
            sn = self
        sn._handle_substatements(grp, gid)
        for augst in stmt.find_all("augment"):
            sn._augment_stmt(augst, sctx)
        for refst in stmt.find_all("refine"):
            sn._refine_stmt(refst, sctx)
1316419
public function handleRequests(): void
    {
        $tail_call = false;
        do {
            $this->arg = $this->simpleArg;
            $this->stack = [$this->arg];
            $this->idx = 0;
            $this->parser->parse();
            if (count($this->stack) > 1) {
                $arg = array_pop($this->stack);
                if ($arg instanceof ApplyArg) {
                    $this->apply($arg);
                } else {
                    $msg = 'Error: $arg should be of type ApplyArg, error in client';
                    $this->logger->critical($msg);
                    throw new Exception\RuntimeException($msg);
                }
                $tail_call = true;
            }
            $this->stack = null;
        } while ($tail_call);
    }
1097922
def invoke_with_usage (self, args, **kwargs):
        
        ap = self.get_arg_parser (**kwargs)
        args = ap.parse_args (args)
        return self.invoke (args, **kwargs)
293175
def handler(value)
      if value.zero?
        @up_callback.call if @up_callback
      else
        @last_press = Time.now
        @down_callback.call if @down_callback
      end

      if value.zero? && (Time.now - @last_press) > @hold_time
        @hold_callback.call if @hold_callback
      end
    end
1163038
def handle_exc(self):
        """"""
        exc_info = sys.exc_info()
        type_, value = exc_info[:2]
        self.db.obj_cache[id(exc_info)] = exc_info

        return '<a href="%d" class="inspect">%s: %s</a>' % (
            id(exc_info), escape(type_.__name__), escape(repr(value))
        )
877471
def handle(self):
        
        #If we have more statements in the buffer than the cached, it doesn't matter, 
        #we just run the first few replacements of the cache concurrently and do 
        #what's left over from the buffer.
        #REVIEW
        if self.mode == "insert": #then self.icached[0] == self.icached[1]:
            #We are inserting the lines from the buffer into the cached version
            for ib in range(len(self.buffered)):
                self.state = (ib, None)
                self.parser.parse(self)
                self._update_extent()

        elif self.mode == "delete": #then self.ibuffer[0] == self.ibuffer[1]:
            #We are deleting lines from the cached version
            for ic in range(len(self.cached)):
                self.state = (None, ic)
                self.parser.parse(self)
                self._update_extent()
        
        else: # mode == 'replace'
            #Need lines from both the buffer and the cached version
            #First we run all the statements in cached as deletions
            for ic in range(len(self.cached)):
                self.state = (None, ic)
                self.parser.parse(self, "delete")
                self._update_extent()
            #Then run all the buffer statements as insertions.
            for ib in range(len(self.buffered)):
                self.state = (ib, None)
                self.parser.parse(self, "insert")
                self._update_extent()

        self._handle_docstrings()
1215538
def handle(self, *args, **options):
        """"""
        for index in options.pop("indexes"):
            data = {}
            try:
                data = self.do_index_command(index, **options)
            except TransportError as ex:
                logger.warning("ElasticSearch threw an error: %s", ex)
                data = {"index": index, "status": ex.status_code, "reason": ex.error}
            finally:
                logger.info(data)
154339
function usage (exitCode) {
  const rs = fs.createReadStream(path.join(__dirname, '/usage.txt'))
  const ws = process.stdout
  rs.pipe(ws)
  ws.on('finish', process.exit.bind(null, exitCode))
}
1367889
def handle_output(self, workunit, label, s):
    """"""
    if not self.is_under_main_root(workunit):
      return
    tool_output_format = self._get_tool_output_format(workunit)
    if tool_output_format == ToolOutputFormat.INDENT:
      self.emit(self._prefix(workunit, s))
    elif tool_output_format == ToolOutputFormat.UNINDENTED:
      self.emit(s)
    self.flush()
1266093
def Handle(self, args, token=None):
    """"""

    if not args.name:
      raise ValueError("Name not specified.")

    return ApiConfigOption().InitFromConfigOption(args.name)
483132
def _parse_resource_usage(cls, action_dict, declarations):
        """"""

        raw_used = action_dict.pop('use', [])
        opened = [x.strip() for x in action_dict.pop('open_before', [])]
        closed = [x.strip() for x in action_dict.pop('close_after', [])]

        used = {}

        for resource in raw_used:
            if 'as' in resource:
                global_name, _, local_name = resource.partition('as')
                global_name = global_name.strip()
                local_name = local_name.strip()

                if len(global_name) == 0 or len(local_name) == 0:
                    raise RecipeFileInvalid("Resource usage specified in action with invalid name using 'as' statement", global_name=global_name, local_name=local_name, statement=resource)
            else:
                global_name = resource.strip()
                local_name = global_name

            if local_name in used:
                raise RecipeFileInvalid("Resource specified twice for action", args=action_dict, resource=local_name, used_resources=used)

            used[local_name] = global_name

        # Make sure we only use, open and close declared resources
        for name in (x for x in used.values() if x not in declarations):
            raise RecipeFileInvalid("Action makes use of non-declared shared resource", name=name)

        for name in (x for x in opened if x not in declarations):
            raise RecipeFileInvalid("Action specified a non-declared shared resource in open_before", name=name)

        for name in (x for x in closed if x not in declarations):
            raise RecipeFileInvalid("Action specified a non-declared shared resource in close_after", name=name)

        return ResourceUsage(used, opened, closed)
41204
def handle(self, *args, **options):
        """"""
        if mon is None:
            sys.stderr.write(MISSING)
        else:
            mon.run(**options)
597899
def usage():
    
    l_bracket = clr.stringc("[", "dark gray")
    r_bracket = clr.stringc("]", "dark gray")
    pipe = clr.stringc("|", "dark gray")

    app_name = clr.stringc("%prog", "bright blue")
    commands = clr.stringc("{0}".format(pipe).join(c.VALID_ACTIONS), "normal")
    help = clr.stringc("--help", "green")
    options = clr.stringc("options", "yellow")

    guide = "\n\n"
    for action in c.VALID_ACTIONS:
        guide += command_name(app_name, action,
                              c.MESSAGES["help_" + action])

    # remove the last line break
    guide = guide[:-1]

    return "{0} {1}{2}{3} {1}{4}{3} {1}{5}{3}\n{6}".format(app_name,
                                                           l_bracket,
                                                           commands,
                                                           r_bracket,
                                                           help,
                                                           options,
                                                           guide)
1010935
def do_use(self, args):
        """"""
        self.instance = args
        self.prompt = self.instance + '> '

        archive = self._client.get_archive(self.instance)
        self.streams = [s.name for s in archive.list_streams()]
        self.tables = [t.name for t in archive.list_tables()]
149712
public void usage() {
        StringBuilder sb = new StringBuilder();
        usageFormatter.usage(sb);
        getConsole().println(sb.toString());
    }
1107853
def usage():
    

    print('Usage:', os.path.basename(sys.argv[0]), '[options]')
    print('Options:')
    print('        -k, --kval=<int>       Value k for generating k-PHP')
    print('                               Available values: [1 .. INT_MAX] (default = 1)')
    print('        -n, --size=<int>       Integer parameter of formula (its size)')
    print('                               Available values: [0 .. INT_MAX] (default = 8)')
    print('        -h, --help')
    print('        -t, --type=<string>    Formula type')
    print('                               Available values: cb, gt, par, php (default = php)')
    print('        -v, --verb             Be verbose (show comments)')
1048093
def _make_pretty_usage(usage):
    

    if usage is not None and usage.strip() != "":
        usage = "\n".join(map(lambda u: u.strip(), usage.split("\n")))
        return "%s\n\n" % usage