neulab/docprompting-conala huggingface dataset:
filter(record)  
Apply this logger’s filters to the record and return True if the record is to be processed. The filters are consulted in turn, until one of them returns a false value. If none of them return a false value, the record will be processed (passed to handlers). If one returns a false value, no further processing of the record occurs.
findCaller(stack_info=False, stacklevel=1)  
Finds the caller’s source filename and line number. Returns the filename, line number, function name and stack information as a 4-element tuple. The stack information is returned as None unless stack_info is True. The stacklevel parameter is passed from code calling the debug() and other APIs. If greater than 1, the excess is used to skip stack frames before determining the values to be returned. This will generally be useful when calling logging APIs from helper/wrapper code, so that the information in the event log refers not to the helper/wrapper code, but to the code that calls it.
getChild(suffix)  
Returns a logger which is a descendant to this logger, as determined by the suffix. Thus, logging.getLogger('abc').getChild('def.ghi') would return the same logger as would be returned by logging.getLogger('abc.def.ghi'). This is a convenience method, useful when the parent logger is named using e.g. __name__ rather than a literal string.  New in version 3.2.
getEffectiveLevel()  
Indicates the effective level for this logger. If a value other than NOTSET has been set using setLevel(), it is returned. Otherwise, the hierarchy is traversed towards the root until a value other than NOTSET is found, and that value is returned. The value returned is an integer, typically one of logging.DEBUG, logging.INFO etc.
handle(record)  
Handles a record by passing it to all handlers associated with this logger and its ancestors (until a false value of propagate is found). This method is used for unpickled records received from a socket, as well as those created locally. Logger-level filtering is applied using filter().
hasHandlers()  
Checks to see if this logger has any handlers configured. This is done by looking for handlers in this logger and its parents in the logger hierarchy. Returns True if a handler was found, else False. The method stops searching up the hierarchy whenever a logger with the ‘propagate’ attribute set to false is found - that will be the last logger which is checked for the existence of handlers.  New in version 3.2.
info(msg, *args, **kwargs)  
Logs a message with level INFO on this logger. The arguments are interpreted as for debug().
isEnabledFor(level)  
Indicates if a message of severity level would be processed by this logger. This method checks first the module-level level set by logging.disable(level) and then the logger’s effective level as determined by getEffectiveLevel().
log(level, msg, *args, **kwargs)  
Logs a message with integer level level on this logger. The other arguments are interpreted as for debug().
makeRecord(name, level, fn, lno, msg, args, exc_info, func=None, extra=None, sinfo=None)  
This is a factory method which can be overridden in subclasses to create specialized LogRecord instances.
propagate  
If this attribute evaluates to true, events logged to this logger will be passed to the handlers of higher level (ancestor) loggers, in addition to any handlers attached to this logger. Messages are passed directly to the ancestor loggers’ handlers - neither the level nor filters of the ancestor loggers in question are considered. If this evaluates to false, logging messages are not passed to the handlers of ancestor loggers. The constructor sets this attribute to True.  Note If you attach a handler to a logger and one or more of its ancestors, it may emit the same record multiple times. In general, you should not need to attach a handler to more than one logger - if you just attach it to the appropriate logger which is highest in the logger hierarchy, then it will see all events logged by all descendant loggers, provided that their propagate setting is left set to True. A common scenario is to attach handlers only to the root logger, and to let propagation take care of the rest.
removeHandler(hdlr)  
Removes the specified handler hdlr from this logger.
setLevel(level)  
Sets the threshold for this logger to level. Logging messages which are less severe than level will be ignored; logging messages which have severity level or higher will be emitted by whichever handler or handlers service this logger, unless a handler’s level has been set to a higher severity level than level. When a logger is created, the level is set to NOTSET (which causes all messages to be processed when the logger is the root logger, or delegation to the parent when the logger is a non-root logger). Note that the root logger is created with level WARNING. The term ‘delegation to the parent’ means that if a logger has a level of NOTSET, its chain of ancestor loggers is traversed until either an ancestor with a level other than NOTSET is found, or the root is reached. If an ancestor is found with a level other than NOTSET, then that ancestor’s level is treated as the effective level of the logger where the ancestor search began, and is used to determine how a logging event is handled. If the root is reached, and it has a level of NOTSET, then all messages will be processed. Otherwise, the root’s level will be used as the effective level. See Logging Levels for a list of levels.  Changed in version 3.2: The level parameter now accepts a string representation of the level such as ‘INFO’ as an alternative to the integer constants such as INFO. Note, however, that levels are internally stored as integers, and methods such as e.g. getEffectiveLevel() and isEnabledFor() will return/expect to be passed integers.
warning(msg, *args, **kwargs)  
Logs a message with level WARNING on this logger. The arguments are interpreted as for debug().  Note There is an obsolete method warn which is functionally identical to warning. As warn is deprecated, please do not use it - use warning instead.
class logging.LoggerAdapter(logger, extra)  
Returns an instance of LoggerAdapter initialized with an underlying Logger instance and a dict-like object.  
process(msg, kwargs)  
Modifies the message and/or keyword arguments passed to a logging call in order to insert contextual information. This implementation takes the object passed as extra to the constructor and adds it to kwargs using key ‘extra’. The return value is a (msg, kwargs) tuple which has the (possibly modified) versions of the arguments passed in.
process(msg, kwargs)  
Modifies the message and/or keyword arguments passed to a logging call in order to insert contextual information. This implementation takes the object passed as extra to the constructor and adds it to kwargs using key ‘extra’. The return value is a (msg, kwargs) tuple which has the (possibly modified) versions of the arguments passed in.
class logging.LogRecord(name, level, pathname, lineno, msg, args, exc_info, func=None, sinfo=None)  
Contains all the information pertinent to the event being logged. The primary information is passed in msg and args, which are combined using msg % args to create the message field of the record.  Parameters 
 
name – The name of the logger used to log the event represented by this LogRecord. Note that this name will always have this value, even though it may be emitted by a handler attached to a different (ancestor) logger. 
level – The numeric level of the logging event (one of DEBUG, INFO etc.) Note that this is converted to two attributes of the LogRecord: levelno for the numeric value and levelname for the corresponding level name. 
pathname – The full pathname of the source file where the logging call was made. 
lineno – The line number in the source file where the logging call was made. 
msg – The event description message, possibly a format string with placeholders for variable data. 
args – Variable data to merge into the msg argument to obtain the event description. 
exc_info – An exception tuple with the current exception information, or None if no exception information is available. 
func – The name of the function or method from which the logging call was invoked. 
sinfo – A text string representing stack information from the base of the stack in the current thread, up to the logging call.     
getMessage()  
Returns the message for this LogRecord instance after merging any user-supplied arguments with the message. If the user-supplied message argument to the logging call is not a string, str() is called on it to convert it to a string. This allows use of user-defined classes as messages, whose __str__ method can return the actual format string to be used. 
  Changed in version 3.2: The creation of a LogRecord has been made more configurable by providing a factory which is used to create the record. The factory can be set using getLogRecordFactory() and setLogRecordFactory() (see this for the factory’s signature).  This functionality can be used to inject your own values into a LogRecord at creation time. You can use the following pattern: old_factory = logging.getLogRecordFactory()

def record_factory(*args, **kwargs):
    record = old_factory(*args, **kwargs)
    record.custom_attribute = 0xdecafbad
    return record

logging.setLogRecordFactory(record_factory)
 With this pattern, multiple factories could be chained, and as long as they don’t overwrite each other’s attributes or unintentionally overwrite the standard attributes listed above, there should be no surprises.
getMessage()  
Returns the message for this LogRecord instance after merging any user-supplied arguments with the message. If the user-supplied message argument to the logging call is not a string, str() is called on it to convert it to a string. This allows use of user-defined classes as messages, whose __str__ method can return the actual format string to be used.
logging.makeLogRecord(attrdict)  
Creates and returns a new LogRecord instance whose attributes are defined by attrdict. This function is useful for taking a pickled LogRecord attribute dictionary, sent over a socket, and reconstituting it as a LogRecord instance at the receiving end.
class logging.NullHandler  
Returns a new instance of the NullHandler class.  
emit(record)  
This method does nothing. 
  
handle(record)  
This method does nothing. 
  
createLock()  
This method returns None for the lock, since there is no underlying I/O to which access needs to be serialized.
createLock()  
This method returns None for the lock, since there is no underlying I/O to which access needs to be serialized.
logging.setLoggerClass(klass)  
Tells the logging system to use the class klass when instantiating a logger. The class should define __init__() such that only a name argument is required, and the __init__() should call Logger.__init__(). This function is typically called before any loggers are instantiated by applications which need to use custom logger behavior. After this call, as at any other time, do not instantiate loggers directly using the subclass: continue to use the logging.getLogger() API to get your loggers.
logging.setLogRecordFactory(factory)  
Set a callable which is used to create a LogRecord.  Parameters 
factory – The factory callable to be used to instantiate a log record.    New in version 3.2: This function has been provided, along with getLogRecordFactory(), to allow developers more control over how the LogRecord representing a logging event is constructed.  The factory has the following signature: factory(name, level, fn, lno, msg, args, exc_info, func=None, sinfo=None, **kwargs)  name 
The logger name.  level 
The logging level (numeric).  fn 
The full pathname of the file where the logging call was made.  lno 
The line number in the file where the logging call was made.  msg 
The logging message.  args 
The arguments for the logging message.  exc_info 
An exception tuple, or None.  func 
The name of the function or method which invoked the logging call.  sinfo 
A stack traceback such as is provided by traceback.print_stack(), showing the call hierarchy.  kwargs 
Additional keyword arguments.
logging.shutdown()  
Informs the logging system to perform an orderly shutdown by flushing and closing all handlers. This should be called at application exit and no further use of the logging system should be made after this call. When the logging module is imported, it registers this function as an exit handler (see atexit), so normally there’s no need to do that manually.
class logging.StreamHandler(stream=None)  
Returns a new instance of the StreamHandler class. If stream is specified, the instance will use it for logging output; otherwise, sys.stderr will be used.  
emit(record)  
If a formatter is specified, it is used to format the record. The record is then written to the stream followed by terminator. If exception information is present, it is formatted using traceback.print_exception() and appended to the stream. 
  
flush()  
Flushes the stream by calling its flush() method. Note that the close() method is inherited from Handler and so does no output, so an explicit flush() call may be needed at times. 
  
setStream(stream)  
Sets the instance’s stream to the specified value, if it is different. The old stream is flushed before the new stream is set.  Parameters 
stream – The stream that the handler should use.  Returns 
the old stream, if the stream was changed, or None if it wasn’t.    New in version 3.7.  
  
terminator  
String used as the terminator when writing a formatted record to a stream. Default value is '\n'. If you don’t want a newline termination, you can set the handler instance’s terminator attribute to the empty string. In earlier versions, the terminator was hardcoded as '\n'.  New in version 3.2.
emit(record)  
If a formatter is specified, it is used to format the record. The record is then written to the stream followed by terminator. If exception information is present, it is formatted using traceback.print_exception() and appended to the stream.
flush()  
Flushes the stream by calling its flush() method. Note that the close() method is inherited from Handler and so does no output, so an explicit flush() call may be needed at times.
setStream(stream)  
Sets the instance’s stream to the specified value, if it is different. The old stream is flushed before the new stream is set.  Parameters 
stream – The stream that the handler should use.  Returns 
the old stream, if the stream was changed, or None if it wasn’t.    New in version 3.7.
terminator  
String used as the terminator when writing a formatted record to a stream. Default value is '\n'. If you don’t want a newline termination, you can set the handler instance’s terminator attribute to the empty string. In earlier versions, the terminator was hardcoded as '\n'.  New in version 3.2.
logging.warning(msg, *args, **kwargs)  
Logs a message with level WARNING on the root logger. The arguments are interpreted as for debug().  Note There is an obsolete function warn which is functionally identical to warning. As warn is deprecated, please do not use it - use warning instead.
exception LookupError  
The base class for the exceptions that are raised when a key or index used on a mapping or sequence is invalid: IndexError, KeyError. This can be raised directly by codecs.lookup().
lzma.compress(data, format=FORMAT_XZ, check=-1, preset=None, filters=None)  
Compress data (a bytes object), returning the compressed data as a bytes object. See LZMACompressor above for a description of the format, check, preset and filters arguments.
lzma.decompress(data, format=FORMAT_AUTO, memlimit=None, filters=None)  
Decompress data (a bytes object), returning the uncompressed data as a bytes object. If data is the concatenation of multiple distinct compressed streams, decompress all of these streams, and return the concatenation of the results. See LZMADecompressor above for a description of the format, memlimit and filters arguments.
lzma.is_check_supported(check)  
Return True if the given integrity check is supported on this system. CHECK_NONE and CHECK_CRC32 are always supported. CHECK_CRC64 and CHECK_SHA256 may be unavailable if you are using a version of liblzma that was compiled with a limited feature set.
class lzma.LZMACompressor(format=FORMAT_XZ, check=-1, preset=None, filters=None)  
Create a compressor object, which can be used to compress data incrementally. For a more convenient way of compressing a single chunk of data, see compress(). The format argument specifies what container format should be used. Possible values are:  
 
FORMAT_XZ: The .xz container format. 

This is the default format.    
 
FORMAT_ALONE: The legacy .lzma container format. 

This format is more limited than .xz – it does not support integrity checks or multiple filters.    
 
FORMAT_RAW: A raw data stream, not using any container format. 

This format specifier does not support integrity checks, and requires that you always specify a custom filter chain (for both compression and decompression). Additionally, data compressed in this manner cannot be decompressed using FORMAT_AUTO (see LZMADecompressor).     The check argument specifies the type of integrity check to include in the compressed data. This check is used when decompressing, to ensure that the data has not been corrupted. Possible values are:  
CHECK_NONE: No integrity check. This is the default (and the only acceptable value) for FORMAT_ALONE and FORMAT_RAW. 
CHECK_CRC32: 32-bit Cyclic Redundancy Check. 
CHECK_CRC64: 64-bit Cyclic Redundancy Check. This is the default for FORMAT_XZ. 
CHECK_SHA256: 256-bit Secure Hash Algorithm.  If the specified check is not supported, an LZMAError is raised. The compression settings can be specified either as a preset compression level (with the preset argument), or in detail as a custom filter chain (with the filters argument). The preset argument (if provided) should be an integer between 0 and 9 (inclusive), optionally OR-ed with the constant PRESET_EXTREME. If neither preset nor filters are given, the default behavior is to use PRESET_DEFAULT (preset level 6). Higher presets produce smaller output, but make the compression process slower.  Note In addition to being more CPU-intensive, compression with higher presets also requires much more memory (and produces output that needs more memory to decompress). With preset 9 for example, the overhead for an LZMACompressor object can be as high as 800 MiB. For this reason, it is generally best to stick with the default preset.  The filters argument (if provided) should be a filter chain specifier. See Specifying custom filter chains for details.  
compress(data)  
Compress data (a bytes object), returning a bytes object containing compressed data for at least part of the input. Some of data may be buffered internally, for use in later calls to compress() and flush(). The returned data should be concatenated with the output of any previous calls to compress(). 
  
flush()  
Finish the compression process, returning a bytes object containing any data stored in the compressor’s internal buffers. The compressor cannot be used after this method has been called.
compress(data)  
Compress data (a bytes object), returning a bytes object containing compressed data for at least part of the input. Some of data may be buffered internally, for use in later calls to compress() and flush(). The returned data should be concatenated with the output of any previous calls to compress().
flush()  
Finish the compression process, returning a bytes object containing any data stored in the compressor’s internal buffers. The compressor cannot be used after this method has been called.
class lzma.LZMADecompressor(format=FORMAT_AUTO, memlimit=None, filters=None)  
Create a decompressor object, which can be used to decompress data incrementally. For a more convenient way of decompressing an entire compressed stream at once, see decompress(). The format argument specifies the container format that should be used. The default is FORMAT_AUTO, which can decompress both .xz and .lzma files. Other possible values are FORMAT_XZ, FORMAT_ALONE, and FORMAT_RAW. The memlimit argument specifies a limit (in bytes) on the amount of memory that the decompressor can use. When this argument is used, decompression will fail with an LZMAError if it is not possible to decompress the input within the given memory limit. The filters argument specifies the filter chain that was used to create the stream being decompressed. This argument is required if format is FORMAT_RAW, but should not be used for other formats. See Specifying custom filter chains for more information about filter chains.  Note This class does not transparently handle inputs containing multiple compressed streams, unlike decompress() and LZMAFile. To decompress a multi-stream input with LZMADecompressor, you must create a new decompressor for each stream.   
decompress(data, max_length=-1)  
Decompress data (a bytes-like object), returning uncompressed data as bytes. Some of data may be buffered internally, for use in later calls to decompress(). The returned data should be concatenated with the output of any previous calls to decompress(). If max_length is nonnegative, returns at most max_length bytes of decompressed data. If this limit is reached and further output can be produced, the needs_input attribute will be set to False. In this case, the next call to decompress() may provide data as b'' to obtain more of the output. If all of the input data was decompressed and returned (either because this was less than max_length bytes, or because max_length was negative), the needs_input attribute will be set to True. Attempting to decompress data after the end of stream is reached raises an EOFError. Any data found after the end of the stream is ignored and saved in the unused_data attribute.  Changed in version 3.5: Added the max_length parameter.  
  
check  
The ID of the integrity check used by the input stream. This may be CHECK_UNKNOWN until enough of the input has been decoded to determine what integrity check it uses. 
  
eof  
True if the end-of-stream marker has been reached. 
  
unused_data  
Data found after the end of the compressed stream. Before the end of the stream is reached, this will be b"". 
  
needs_input  
False if the decompress() method can provide more decompressed data before requiring new uncompressed input.  New in version 3.5.
check  
The ID of the integrity check used by the input stream. This may be CHECK_UNKNOWN until enough of the input has been decoded to determine what integrity check it uses.
unused_data  
Data found after the end of the compressed stream. Before the end of the stream is reached, this will be b"".
exception lzma.LZMAError  
This exception is raised when an error occurs during compression or decompression, or while initializing the compressor/decompressor state.