:return: Returns boolean value to indicate if 128bit trace_id
        generation is enabled
549269
def generate_128bit_trace_id(self):
        
        if 'generate_128bit_trace_id' in self.config:
            return get_boolean(self.config['generate_128bit_trace_id'], False)
        return os.getenv('JAEGER_TRACEID_128BIT') == 'true'
1103055
def should_sample(self):
        
        return self.span_context.trace_options.enabled \
            or self.sampler.should_sample(self.span_context.trace_id)
175173
def take(self):
        
        with self._lock:
            now = int(time.time())

            if now != self.this_sec:
                self.used_this_sec = 0
                self.this_sec = now

            if self.used_this_sec >= self.traces_per_sec:
                return False

            self.used_this_sec = self.used_this_sec + 1
            return True
356095
def set_slave_bus_bypass(self, enable):
        
        current = self.i2c_read_register(0x37, 1)[0]
        if enable:
            current |= 0b00000010
        else:
            current &= 0b11111101
        self.i2c_write_register(0x37, current)
1173449
def wrongstatus(data, sb, msb, lsb):
    

    # status bit, most significant bit, least significant bit
    status = int(data[sb-1])
    value = bin2int(data[msb-1:lsb])

    if not status:
        if value != 0:
            return True

    return False
1224673
public boolean isTraceEnabled() {
		return MINIMUM_LEVEL_COVERS_TRACE && provider.isEnabled(STACKTRACE_DEPTH, null, org.tinylog.Level.TRACE);
	}
1086439
def verify_sigfile(sigdir, sig):
    """"""
    cmd = ['sigtool', '-i', '%s/%s.cvd' % (sigdir, sig)]
    sigtool = Popen(cmd, stdout=PIPE, stderr=PIPE)
    ret_val = sigtool.wait()
    return ret_val == 0
334675
def is_binary_address(value: Any) -> bool:
    
    if not is_bytes(value):
        return False
    elif len(value) != 20:
        return False
    else:
        return True
649467
def store_traces(self, value):
        
        if not value:
            self.logger.debug("Stopping storing received lines for dut %d", self.index)
            self._store_traces = False
        else:
            self.logger.debug("Resuming storing received lines for dut %d", self.index)
            self._store_traces = True
399943
private void checkStability() {
    if ((_watermarksInserted.getCount() - _watermarksSwept.getCount()) > _watermarkLagThreshold) {
      log.error("Setting abort flag for Watermark tracking because the lag between the "
          + "watermarksInserted: {} and watermarksSwept: {} is greater than the threshold: {}",
          _watermarksInserted.getCount(), _watermarksSwept.getCount(), _watermarkLagThreshold);
      _abort.set(true);
    }
  }
612751
def is_enabled(iface):
    '''
    
    '''
    cmd = ['netsh', 'interface', 'show', 'interface', 'name={0}'.format(iface)]
    iface_found = False
    for line in __salt__['cmd.run'](cmd, python_shell=False).splitlines():
        if 'Connect state:' in line:
            iface_found = True
            return line.split()[-1] == 'Connected'
    if not iface_found:
        raise CommandExecutionError(
            'Interface \'{0}\' not found'.format(iface)
        )
    return False
1188066
def set_global_tracer(value):
    
    if value is None:
        raise ValueError('The global Tracer tracer cannot be None')

    global tracer, is_tracer_registered
    tracer = value
    is_tracer_registered = True
888039
private boolean checkEnabled() {
        /* Enable this analyzer ONLY if the Nexus URL has been set to something
         other than the default one (if it's the default one, we'll use the
         central one) and it's enabled by the user.
         */
        boolean retval = false;
        try {
            if (!DEFAULT_URL.equals(getSettings().getString(Settings.KEYS.ANALYZER_NEXUS_URL))
                    && getSettings().getBoolean(Settings.KEYS.ANALYZER_NEXUS_ENABLED)) {
                LOGGER.info("Enabling Nexus analyzer");
                retval = true;
            } else {
                LOGGER.debug("Nexus analyzer disabled, using Central instead");
            }
        } catch (InvalidSettingException ise) {
            LOGGER.warn("Invalid setting. Disabling Nexus analyzer");
        }

        return retval;
    }
329374
def enable_tracing(self):
        
        hooktrace = self.hook._trace

        def before(hook_name, methods, kwargs):
            hooktrace.root.indent += 1
            hooktrace(hook_name, kwargs)

        def after(outcome, hook_name, methods, kwargs):
            if outcome.excinfo is None:
                hooktrace("finish", hook_name, "-->", outcome.get_result())
            hooktrace.root.indent -= 1

        return self.add_hookcall_monitoring(before, after)
1083538
def hasMZSignature(self, rd): 
        
        rd.setOffset(0)
        sign = rd.read(2)
        if sign == "MZ":
            return True
        return False
762168
def get_trace_id_from_flask():
    
    if flask is None or not flask.request:
        return None

    header = flask.request.headers.get(_FLASK_TRACE_HEADER)

    if header is None:
        return None

    trace_id = header.split("/", 1)[0]

    return trace_id
390370
def is_idle(self):
        
        return (self.status is None or
                self.app_id in (None, IDLE_APP_ID) or
                (not self.status.is_active_input and not self.ignore_cec))