def Func(arg_0=None, arg_1=None, arg_2=60, arg_3=False, arg_4='all'):
    """Decorator function for making python apps.

    Parameters
    ----------
    function : function
        Do not pass this keyword argument directly. This is needed in order to allow for omitted parenthesis,
        for example, `@Func` if using all defaults or `@Func(walltime=120)`. If the
        decorator is used alone, function will be the actual function being decorated, whereas if it
        is called with arguments, function will be None. Default is None.
    data_flow_kernel : DataFlowKernel
        The :class:`~parsl.dataflow.dflow.DataFlowKernel` responsible for managing this app. This can
        be omitted only after calling :meth:`parsl.dataflow.dflow.DataFlowKernelLoader.load`. Default is None.
    walltime : int
        Walltime for app in seconds. Default is 60.
    executors : string or list
        Labels of the executors that this app can execute over. Default is 'all'.
    cache : bool
        Enable caching of the app call. Default is False.
    """
    from parsl.app.python import PythonApp

    def decorator(arg_5):
        def wrapper(arg_6):
            return PythonApp(arg_6,
                             arg_1=arg_1,
                             arg_2=arg_2,
                             arg_3=arg_3,
                             arg_4=arg_4)
        return wrapper(arg_5)
    if arg_0 is not None:
        return decorator(arg_0)
    return decorator


def Func(arg_0=None, arg_1=None, arg_2=60, arg_3=False, arg_4='all'):
    """Decorator function for making bash apps.

    Parameters
    ----------
    function : function
        Do not pass this keyword argument directly. This is needed in order to allow for omitted parenthesis,
        for example, `@Func` if using all defaults or `@Func(walltime=120)`. If the
        decorator is used alone, function will be the actual function being decorated, whereas if it
        is called with arguments, function will be None. Default is None.
    data_flow_kernel : DataFlowKernel
        The :class:`~parsl.dataflow.dflow.DataFlowKernel` responsible for managing this app. This can
        be omitted only after calling :meth:`parsl.dataflow.dflow.DataFlowKernelLoader.load`. Default is None.
    walltime : int
        Walltime for app in seconds. Default is 60.
    executors : string or list
        Labels of the executors that this app can execute over. Default is 'all'.
    cache : bool
        Enable caching of the app call. Default is False.
    """
    from parsl.app.bash import BashApp

    def decorator(arg_5):
        def wrapper(arg_6):
            return BashApp(arg_6,
                           arg_1=arg_1,
                           arg_2=arg_2,
                           arg_3=arg_3,
                           arg_4=arg_4)
        return wrapper(arg_5)
    if arg_0 is not None:
        return decorator(arg_0)
    return decorator


def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
        """ Internal
        Wrap the Parsl app with a function that will call the monitor function and point it at the correct pid when the task begins.
        """
        def wrapped(*arg_5, **arg_6):
            arg_7 = Process(target=monitor, arg_5=(os.getpid(), arg_1, arg_2, arg_3, arg_4))
            arg_7.start()
            try:
                return arg_0(*arg_5, **arg_6)
            finally:
                # There's a chance of zombification if the workers are killed by some signals
                arg_7.terminate()
                arg_7.join()
        return wrapped


def Func(arg_0, arg_1, arg_2):
        ''' Transport file on the remote side to a local directory

        Args:
            - remote_source (string): remote_source
            - local_dir (string): Local directory to copy to

        Returns:
            - str: Local path to file

        Raises:
            - FileExists : Name collision at local directory.
            - FileCopyException : FileCopy failed.
        '''

        arg_3 = arg_2 + '/' + os.path.basename(arg_1)

        try:
            os.makedirs(arg_2)
        except OSError as e:
            if e.errno != errno.EEXIST:
                logger.exception("Failed to create script_dir: {0}".format(script_dir))
                raise BadScriptPath(e, arg_0.hostname)

        # Easier to check this than to waste time trying to pull file and
        # realize there's a problem.
        if os.path.exists(arg_3):
            logger.exception("Remote file copy will overwrite a local file:{0}".format(arg_3))
            raise FileExists(None, arg_0.hostname, filename=arg_3)

        try:
            arg_0.sftp_client.get(arg_1, arg_3)
        except Exception as e:
            logger.exception("File pull failed")
            raise FileCopyException(e, arg_0.hostname)

        return arg_3


def Func(arg_0, arg_1):
        """Return true if the path refers to an existing directory.

        Parameters
        ----------
        path : str
            Path of directory on the remote side to check.
        """
        arg_2 = True
        try:
            arg_0.sftp_client.lstat(arg_1)
        except FileNotFoundError:
            arg_2 = False

        return arg_2


def Func(arg_0, arg_1, arg_2=511, arg_3=False):
        """Create a directory on the remote side.

        If intermediate directories do not exist, they will be created.

        Parameters
        ----------
        path : str
            Path of directory on the remote side to create.
        mode : int
            Permissions (posix-style) for the newly-created directory.
        exist_ok : bool
            If False, raise an OSError if the target directory already exists.
        """
        if arg_3 is False and arg_0.isdir(arg_1):
            raise OSError('Target directory {} already exists'.format(arg_1))

        arg_0.execute_wait('mkdir -p {}'.format(arg_1))
        arg_0.sftp_client.chmod(arg_1, arg_2)


def Func(arg_0, arg_1):
        """Let the FlowControl system know that there is an event."""
        arg_0._event_buffer.extend([arg_1])
        arg_0._event_count += 1
        if arg_0._event_count >= arg_0.threshold:
            logger.debug("Eventcount >= threshold")
            arg_0.make_callback(kind="event")


def Func(arg_0, arg_1):
        """ Create the kubernetes deployment """

        arg_2 = arg_0.kube_client.create_namespaced_deployment(
            body=arg_1,
            namespace=arg_0.namespace)

        logger.debug("Deployment created. status='{0}'".format(str(arg_2.status)))


def Func(arg_0):
        """ Compose the launch command and call the scale_out

        This should be implemented in the child classes to take care of
        executor specific oddities.
        """
        arg_1 = "--debug" if arg_0.worker_debug else ""
        arg_2 = "" if arg_0.max_workers == float('inf') else "--max_workers={}".format(arg_0.max_workers)

        arg_3 = "{}/{}".format(arg_0.run_dir, arg_0.label)
        if arg_0.worker_logdir_root is not None:
            arg_3 = "{}/{}".format(arg_0.worker_logdir_root, arg_0.label)

        arg_4 = arg_0.launch_cmd.format(debug=arg_1,
                                       prefetch_capacity=arg_0.prefetch_capacity,
                                       task_url=arg_0.worker_task_url,
                                       result_url=arg_0.worker_result_url,
                                       cores_per_worker=arg_0.cores_per_worker,
                                       arg_2=arg_2,
                                       nodes_per_block=arg_0.provider.nodes_per_block,
                                       heartbeat_period=arg_0.heartbeat_period,
                                       heartbeat_threshold=arg_0.heartbeat_threshold,
                                       poll_period=arg_0.poll_period,
                                       logdir=arg_3)
        arg_0.launch_cmd = arg_4
        logger.debug("Launch command: {}".format(arg_0.launch_cmd))

        arg_0._scaling_enabled = arg_0.provider.scaling_enabled
        logger.debug("Starting HighThroughputExecutor with provider:\n%s", arg_0.provider)
        if hasattr(arg_0.provider, 'init_blocks'):
            try:
                arg_0.scale_out(blocks=arg_0.provider.init_blocks)
            except Exception as e:
                logger.error("Scaling out failed: {}".format(e))
                raise e


def Func(arg_0):
        """ Starts the interchange process locally

        Starts the interchange process locally and uses an internal command queue to
        get the worker task and result ports that the interchange has bound to.
        """
        arg_1 = Queue(maxsize=10)
        arg_0.queue_proc = Process(target=interchange.starter,
                                  args=(arg_1,),
                                  kwargs={"client_ports": (arg_0.outgoing_q.port,
                                                           arg_0.incoming_q.port,
                                                           arg_0.command_client.port),
                                          "worker_ports": arg_0.worker_ports,
                                          "worker_port_range": arg_0.worker_port_range,
                                          "logdir": "{}/{}".format(arg_0.run_dir, arg_0.label),
                                          "suppress_failure": arg_0.suppress_failure,
                                          "heartbeat_threshold": arg_0.heartbeat_threshold,
                                          "poll_period": arg_0.poll_period,
                                          "logging_level": logging.DEBUG if arg_0.worker_debug else logging.INFO
                                  },
        )
        arg_0.queue_proc.start()
        try:
            (arg_3, arg_4) = arg_1.get(block=True, timeout=120)
        except queue.Empty:
            logger.error("Interchange has not completed initialization in 120s. Aborting")
            raise Exception("Interchange failed to start")

        arg_0.worker_task_url = "tcp://{}:{}".format(arg_0.address, arg_3)
        arg_0.worker_result_url = "tcp://{}:{}".format(arg_0.address, arg_4)


def Func(arg_0, arg_1):
        """Puts a worker on hold, preventing scheduling of additional tasks to it.

        This is called "hold" mostly because this only stops scheduling of tasks,
        and does not actually kill the worker.

        Parameters
        ----------

        worker_id : str
            Worker id to be put on hold
        """
        arg_2 = arg_0.command_client.run("HOLD_WORKER;{}".format(arg_1))
        logger.debug("Sent hold request to worker: {}".format(arg_1))
        return arg_2


def Func(arg_0, arg_1):
        """ Sends hold command to all managers which are in a specific block

        Parameters
        ----------
        block_id : str
             Block identifier of the block to be put on hold
        """

        arg_2 = arg_0.connected_managers

        for arg_3 in arg_2:
            if arg_3['block_id'] == arg_1:
                logger.debug("[HOLD_BLOCK]: Sending hold to manager:{}".format(arg_3['manager']))
                arg_0.hold_worker(arg_3['manager'])


def Func(arg_0):
        """Return status of all blocks."""

        Func = []
        if arg_0.provider:
            Func = arg_0.provider.status(arg_0.blocks.values())

        return Func


def Func(arg_0, *arg_1):
    """
    Called by RQ when there is a failure in a worker.

    NOTE: Make sure that in your RQ worker process, rollbar.init() has been called with
    handler='blocking'. The default handler, 'thread', does not work from inside an RQ worker.
    """
    # Report data about the job with the exception.
    arg_2 = arg_0.to_dict()
    # job_info['data'] is the pickled representation of the job, and doesn't json-serialize well.
    # repr() works nicely.
    arg_2['data'] = repr(arg_2['data'])

    arg_3 = {'job': arg_2}
    arg_4 = {'framework': 'rq'}

    rollbar.report_exc_info(arg_1, arg_3=arg_3, arg_4=arg_4)

    # continue to the next handler
    return True


def Func(arg_0):
    """
    Pyramid entry point
    """
    arg_1 = arg_0.registry.settings

    arg_0.add_tween('rollbar.contrib.pyramid.rollbar_tween_factory', over=EXCVIEW)

    # run patch_debugtoolbar, unless they disabled it
    if asbool(arg_1.get('rollbar.patch_debugtoolbar', True)):
        patch_debugtoolbar(arg_1)

    def hook(arg_2, arg_3):
        arg_3['framework'] = 'pyramid'

        if arg_2:
            arg_2.environ['rollbar.uuid'] = arg_3['uuid']

            if arg_2.matched_route:
                arg_3['context'] = arg_2.matched_route.name

    arg_5.BASE_DATA_HOOK = hook

    arg_7 = parse_settings(arg_1)

    arg_8 = arg_7.pop('access_token')
    arg_9 = arg_7.pop('environment', 'production')

    if arg_7.get('scrub_fields'):
        arg_7['scrub_fields'] = set([str.strip(x) for x in arg_7.get('scrub_fields').split('\n') if x])

    if arg_7.get('exception_level_filters'):
        arg_10 = DottedNameResolver()
        arg_11 = []
        for arg_12 in arg_7.get('exception_level_filters').split('\n'):
            if arg_12:
                arg_13, arg_14 = arg_12.split()

                try:
                    arg_15 = arg_10.resolve(arg_13)
                    arg_11.append((arg_15, arg_14))
                except ImportError:
                    log.error('Could not import %r' % arg_13)

        arg_7['exception_level_filters'] = arg_11

    arg_7['enabled'] = asbool(arg_7.get('enabled', True))

    arg_5.init(arg_8, arg_9, **arg_7)


def Func(arg_0):
    """
    Decorator for making error handling on AWS Lambda easier
    """
    @functools.wraps(arg_0)
    def wrapper(arg_1, arg_2):
        global arg_3
        arg_3 = arg_2
        try:
            arg_4 = arg_0(arg_1, arg_2)
            return wait(lambda: arg_4)
        except:
            arg_5, arg_6, arg_7 = sys.exc_info()
            report_exc_info((arg_5, arg_6, arg_7.tb_next))
            wait()
            raise
    return wrapper


def Func(arg_0, arg_1='error', arg_2=None, arg_3=None, arg_4=None):
    """
    Reports an arbitrary string message to Rollbar.

    message: the string body of the message
    level: level to report at. One of: 'critical', 'error', 'warning', 'info', 'debug'
    request: the request object for the context of the message
    extra_data: dictionary of params to include with the message. 'body' is reserved.
    payload_data: param names to pass in the 'data' level of the payload; overrides defaults.
    """
    try:
        return _Func(arg_0, arg_1, arg_2, arg_3, arg_4)
    except Exception as e:
        log.exception("Exception while reporting message to Rollbar. %r", e)


def Func(arg_0, arg_1=None, arg_2=None, arg_3=None, **arg_4):
    """
    Searches a project for items that match the input criteria.

    title: all or part of the item's title to search for.
    return_fields: the fields that should be returned for each item.
            e.g. ['id', 'project_id', 'status'] will return a dict containing
                 only those fields for each item.
    access_token: a project access token. If this is not provided,
                  the one provided to init() will be used instead.
    search_fields: additional fields to include in the search.
            currently supported: status, level, environment
    """
    if not arg_0:
        return []

    if arg_1 is not None:
        arg_1 = ','.join(arg_1)

    return _get_api('search/',
                    arg_0=arg_0,
                    fields=arg_1,
                    arg_2=arg_2,
                    arg_3=arg_3,
                    **arg_4)


def Func():
    """
    Creates .rollbar log file for use with rollbar-agent
    """
    arg_0 = SETTINGS['agent.log_file']
    if not arg_0.endswith('.rollbar'):
        log.error("Provided agent log file does not end with .rollbar, which it must. "
                  "Using default instead.")
        arg_0 = DEFAULTS['agent.log_file']

    arg_1 = logging.getLogger('rollbar_agent')
    arg_2 = logging.FileHandler(arg_0, 'a', 'utf-8')
    arg_3 = logging.Formatter('%(message)s')
    arg_2.setFormatter(arg_3)
    arg_1.addHandler(arg_2)
    arg_1.setLevel(logging.WARNING)
    return arg_1


def Func(arg_0):
    """
    Returns a dictionary describing the logged-in user using data from `request.

    Try request.rollbar_person first, then 'user', then 'user_id'
    """
    if hasattr(arg_0, 'rollbar_person'):
        arg_1 = arg_0.rollbar_person
        try:
            arg_2 = arg_1()
        except TypeError:
            arg_2 = arg_1

        if arg_2 and isinstance(arg_2, dict):
            return arg_2
        else:
            return None

    if hasattr(arg_0, 'user'):
        arg_3 = arg_0.user
        try:
            arg_4 = arg_3()
        except TypeError:
            arg_4 = arg_3

        if not arg_4:
            return None
        elif isinstance(arg_4, dict):
            return arg_4
        else:
            arg_5 = {}
            if getattr(arg_4, 'id', None):
                arg_5['id'] = text(arg_4.id)
            elif getattr(arg_4, 'user_id', None):
                arg_5['id'] = text(arg_4.user_id)

            # id is required, so only include username/email if we have an id
            if arg_5.get('id'):
                arg_6 = getattr(arg_4, 'username', None)
                arg_7 = getattr(arg_4, 'email', None)
                arg_5.update({
                    'username': arg_6,
                    'email': arg_7
                })
            return arg_5

    if hasattr(arg_0, 'user_id'):
        arg_8 = arg_0.user_id
        try:
            arg_9 = arg_8()
        except TypeError:
            arg_9 = arg_8

        if not arg_9:
            return None
        return {'id': text(arg_9)}


def Func(arg_0):
    """
    Attempts to add information from the lambda context if it exists
    """
    global arg_3
    arg_1 = arg_3
    if arg_1 is None:
        return
    try:
        arg_2 = {
            'lambda': {
                'remaining_time_in_millis': arg_1.get_remaining_time_in_millis(),
                'function_name': arg_1.function_name,
                'function_version': arg_1.function_version,
                'arn': arg_1.invoked_function_arn,
                'request_id': arg_1.aws_request_id,
            }
        }
        if 'custom' in arg_0:
            arg_0['custom'] = dict_merge(arg_0['custom'], arg_2)
        else:
            arg_0['custom'] = arg_2
    except Exception as e:
        log.exception("Exception while adding lambda context data: %r", e)
    finally:
        arg_3 = None


def Func(arg_0, arg_1):
    """
    Attempts to build request data; if successful, sets the 'request' key on `data`.
    """
    try:
        arg_2 = _build_request_data(arg_1)
    except Exception as e:
        log.exception("Exception while building request_data for Rollbar payload: %r", e)
    else:
        if arg_2:
            _filter_ip(arg_2, SETTINGS['capture_ip'])
            arg_0['request'] = arg_2


def Func(arg_0, arg_1, arg_2):
    """
    Returns True if we should record local variables for the given frame.
    """
    # Include the last frames locals
    # Include any frame locals that came from a file in the project's root
    return any(((arg_1 == arg_2 - 1),
                ('root' in SETTINGS and (arg_0.get('filename') or '').lower().startswith((SETTINGS['root'] or '').lower()))))


def Func(arg_0):
    """
    Returns a dictionary containing data from the request.
    Can handle webob or werkzeug-based request objects.
    """

    # webob (pyramid)
    if WebobBaseRequest and isinstance(arg_0, WebobBaseRequest):
        return _build_webob_request_data(arg_0)

    # django
    if DjangoHttpRequest and isinstance(arg_0, DjangoHttpRequest):
        return _build_django_request_data(arg_0)

    # django rest framework
    if RestFrameworkRequest and isinstance(arg_0, RestFrameworkRequest):
        return _build_django_request_data(arg_0)

    # werkzeug (flask)
    if WerkzeugRequest and isinstance(arg_0, WerkzeugRequest):
        return _build_werkzeug_request_data(arg_0)

    # tornado
    if TornadoRequest and isinstance(arg_0, TornadoRequest):
        return _build_tornado_request_data(arg_0)

    # bottle
    if BottleRequest and isinstance(arg_0, BottleRequest):
        return _build_bottle_request_data(arg_0)

    # Sanic
    if SanicRequest and isinstance(arg_0, SanicRequest):
        return _build_sanic_request_data(arg_0)

    # falcon
    if FalconRequest and isinstance(arg_0, FalconRequest):
        return _build_falcon_request_data(arg_0)

    # Plain wsgi (should be last)
    if isinstance(arg_0, dict) and 'wsgi.version' in arg_0:
        return _build_wsgi_request_data(arg_0)

    return None


def Func():
    """
    Returns a dictionary containing information about the server environment.
    """
    # server environment
    arg_0 = {
        'host': socket.gethostname(),
        'pid': os.getpid()
    }

    # argv does not always exist in embedded python environments
    arg_1 = getattr(sys, 'argv', None)
    if arg_1:
         arg_0['argv'] = arg_1

    for arg_2 in ['branch', 'root']:
        if SETTINGS.get(arg_2):
            arg_0[arg_2] = SETTINGS[arg_2]

    return arg_0


def Func():
    rollbar.init('ACCESS_TOKEN', environment='test', handler='twisted')

    """This runs the protocol on port 8000"""
    arg_0 = arg_1.ServerFactory()
    arg_0.protocol = Echo
    reactor.listenTCP(8000, arg_0)
    reactor.run()


def Func(arg_0, arg_1, **arg_2):
        """
        Read into ``buf`` from the device. The number of bytes read will be the
        length of ``buf``.

        If ``start`` or ``end`` is provided, then the buffer will be sliced
        as if ``buf[start:end]``. This will not cause an allocation like
        ``buf[start:end]`` will so it saves memory.

        :param bytearray buffer: buffer to write into
        :param int start: Index to start writing at
        :param int end: Index to write up to but not include
        """
        arg_0.i2c.readfrom_into(arg_0.device_address, arg_1, **arg_2)
        if arg_0._debug:
            print("i2c_device.Func:", [hex(arg_3) for arg_3 in arg_1])


def Func(arg_0, arg_1, **arg_2):
        """
        Write the bytes from ``buffer`` to the device. Transmits a stop bit if
        ``stop`` is set.

        If ``start`` or ``end`` is provided, then the buffer will be sliced
        as if ``buffer[start:end]``. This will not cause an allocation like
        ``buffer[start:end]`` will so it saves memory.

        :param bytearray buffer: buffer containing the bytes to Func
        :param int start: Index to start writing from
        :param int end: Index to read up to but not include
        :param bool stop: If true, output an I2C stop condition after the buffer is written
        """
        arg_0.i2c.Functo(arg_0.device_address, arg_1, **arg_2)
        if arg_0._debug:
            print("i2c_device.Func:", [hex(arg_3) for arg_3 in arg_1])


def Func(arg_0, arg_1, arg_2, *,
                            arg_3=0, arg_4=None, arg_5=0, arg_6=None, arg_7=True):
        """
        Write the bytes from ``out_buffer`` to the device, then immediately
        reads into ``in_buffer`` from the device. The number of bytes read
        will be the length of ``in_buffer``.
        Transmits a stop bit after the write, if ``stop`` is set.

        If ``out_start`` or ``out_end`` is provided, then the output buffer
        will be sliced as if ``out_buffer[out_start:out_end]``. This will
        not cause an allocation like ``buffer[out_start:out_end]`` will so
        it saves memory.

        If ``in_start`` or ``in_end`` is provided, then the input buffer
        will be sliced as if ``in_buffer[in_start:in_end]``. This will not
        cause an allocation like ``in_buffer[in_start:in_end]`` will so
        it saves memory.

        :param bytearray out_buffer: buffer containing the bytes to write
        :param bytearray in_buffer: buffer containing the bytes to read into
        :param int out_start: Index to start writing from
        :param int out_end: Index to read up to but not include
        :param int in_start: Index to start writing at
        :param int in_end: Index to write up to but not include
        :param bool stop: If true, output an I2C stop condition after the buffer is written
        """
        if arg_4 is None:
            arg_4 = len(arg_1)
        if arg_6 is None:
            arg_6 = len(arg_2)
        if hasattr(arg_0.i2c, 'writeto_then_readfrom'):
            if arg_0._debug:
                print("i2c_device.writeto_then_readfrom.out_buffer:",
                      [hex(arg_8) for arg_8 in arg_1[arg_3:arg_4]])
            # In linux, at least, this is a special kernel function call
            arg_0.i2c.writeto_then_readfrom(arg_0.device_address, arg_1, arg_2,
                                           arg_3=arg_3, arg_4=arg_4,
                                           arg_5=arg_5, arg_6=arg_6, arg_7=arg_7)
            if arg_0._debug:
                print("i2c_device.writeto_then_readfrom.in_buffer:",
                      [hex(arg_8) for arg_8 in arg_2[arg_5:arg_6]])
        else:
            # If we don't have a special implementation, we can fake it with two calls
            arg_0.write(arg_1, start=arg_3, end=arg_4, arg_7=arg_7)
            if arg_0._debug:
                print("i2c_device.Func.write.out_buffer:",
                      [hex(arg_8) for arg_8 in arg_1[arg_3:arg_4]])
            arg_0.readinto(arg_2, start=arg_5, end=arg_6)
            if arg_0._debug:
                print("i2c_device.Func.readinto.in_buffer:",
                      [hex(arg_8) for arg_8 in arg_2[arg_5:arg_6]])


def Func(arg_0, arg_1, arg_2=u''):
    """This function returns a Hangul letter by composing the specified chosung, joongsung, and jongsung.
    @param chosung
    @param joongsung
    @param jongsung the terminal Hangul letter. This is optional if you do not need a jongsung."""

    if arg_2 is None: arg_2 = u''

    try:
        arg_3 = CHO.index(arg_0)
        arg_4 = JOONG.index(arg_1)
        arg_5 = JONG.index(arg_2)
    except Exception:
        raise NotHangulException('No valid Hangul character index')

    return unichr(0xAC00 + arg_3 * NUM_JOONG * NUM_JONG + arg_4 * NUM_JONG + arg_5)


def Func(arg_0):
    """Check whether this letter contains Jongsung"""
    if len(arg_0) != 1:
        raise Exception('The target string must be one letter.')
    if not is_hangul(arg_0):
        raise NotHangulException('The target string must be Hangul')

    arg_1 = lt.hangul_index(arg_0)
    return arg_1 % NUM_JONG > 0


def Func(arg_0):
    """Returns true if node is inside the name of an except handler."""
    arg_1 = arg_0
    while arg_1 and not isinstance(arg_1.parent, astroid.ExceptHandler):
        arg_1 = arg_1.parent

    return arg_1 and arg_1 is arg_1.parent.name


def Func(arg_0: arg_1.node_classes.NodeNG) -> bool:
    """Return true if given node is inside lambda"""
    arg_4 = arg_0.parent
    while arg_4 is not None:
        if isinstance(arg_4, arg_1.Lambda):
            return True
        arg_4 = arg_4.parent
    return False


def Func(
    arg_0: arg_1.node_classes.NodeNG
) -> Iterable[arg_1.node_classes.NodeNG]:
    """Recursively returns all atoms in nested lists and tuples."""
    if isinstance(arg_0, (arg_1.Tuple, arg_1.List)):
        for arg_4 in arg_0.elts:
            for arg_5 in Func(arg_4):
                yield arg_5
    else:
        yield arg_0


def Func(arg_0: arg_1.node_classes.NodeNG) -> bool:
    """return True if the node is referencing the "super" builtin function
    """
    if getattr(arg_0, "name", None) == "super" and arg_0.root().name == BUILTINS_NAME:
        return True
    return False


def Func(arg_0: arg_1.node_classes.NodeNG) -> bool:
    """return true if the function does nothing but raising an exception"""
    for arg_4 in arg_0.get_children():
        if isinstance(arg_4, arg_1.Raise):
            return True
    return False


def Func(arg_0: arg_1.node_classes.NodeNG) -> bool:
    """return true if the given Name node is used in function or lambda
    default argument's value
    """
    arg_4 = arg_0.scope()
    if isinstance(arg_4, (arg_1.FunctionDef, arg_1.Lambda)):
        for arg_5 in arg_4.args.defaults:
            for arg_6 in arg_5.nodes_of_class(arg_1.Name):
                if arg_6 is arg_0:
                    return True
    return False


def Func(arg_0: arg_1.node_classes.NodeNG) -> bool:
    """return true if the name is used in function decorator"""
    arg_4 = arg_0.parent
    while arg_4 is not None:
        if isinstance(arg_4, arg_1.Decorators):
            return True
        if arg_4.is_statement or isinstance(
            arg_4,
            (arg_1.Lambda, scoped_nodes.ComprehensionScope, scoped_nodes.ListComp),
        ):
            break
        arg_4 = arg_4.parent
    return False


def Func(
    arg_0: arg_1.node_classes.NodeNG, arg_4: arg_1.node_classes.NodeNG
) -> bool:
    """return True if `frame` is an astroid.Class node with `node` in the
    subtree of its bases attribute
    """
    try:
        arg_5 = arg_0.bases
    except AttributeError:
        return False
    for arg_6 in arg_5:
        if arg_4 in arg_6.nodes_of_class(arg_1.Name):
            return True
    return False


def Func(arg_0: arg_1.node_classes.NodeNG) -> arg_1.node_classes.NodeNG:
    """return the higher parent which is not an AssignName, Tuple or List node
    """
    while arg_0 and isinstance(arg_0, (arg_1.AssignName, arg_1.Tuple, arg_1.List)):
        arg_0 = arg_0.parent
    return arg_0


def Func(*arg_0: arg_1) -> Callable:
    """decorator to store messages that are handled by a checker method"""

    def store_messages(arg_2):
        arg_2.checks_msgs = arg_0
        return arg_2

    return store_messages


def Func(
    arg_0: arg_1.Call, arg_3: arg_4 = None, arg_5: arg_6 = None
) -> arg_1.Name:
    """Returns the specified argument from a function call.

    :param astroid.Call call_node: Node representing a function call to check.
    :param int position: position of the argument.
    :param str keyword: the keyword of the argument.

    :returns: The node representing the argument, None if the argument is not found.
    :rtype: astroid.Name
    :raises ValueError: if both position and keyword are None.
    :raises NoSuchArgumentError: if no argument at the provided position or with
    the provided keyword.
    """
    if arg_3 is None and arg_5 is None:
        raise ValueError("Must specify at least one of: position or keyword.")
    if arg_3 is not None:
        try:
            return arg_0.args[arg_3]
        except IndexError:
            pass
    if arg_5 and arg_0.keywords:
        for arg_7 in arg_0.keywords:
            if arg_7.arg == arg_5:
                return arg_7.value

    raise NoSuchArgumentError


def Func(arg_0: arg_1.ExceptHandler, arg_3) -> bool:
    """
    Check if the given exception handler catches
    the given error_type.

    The *handler* parameter is a node, representing an ExceptHandler node.
    The *error_type* can be an exception, such as AttributeError,
    the name of an exception, or it can be a tuple of errors.
    The function will return True if the handler catches any of the
    given errors.
    """

    def stringify_error(arg_4):
        if not isinstance(arg_4, str):
            return arg_4.__name__
        return arg_4

    if not isinstance(arg_3, tuple):
        arg_3 = (arg_3,)  # type: ignore
    arg_5 = {stringify_error(arg_4) for arg_4 in arg_3}  # type: ignore
    if not arg_0.type:
        return True
    return arg_0.catch(arg_5)


def Func(arg_0: arg_1.FunctionDef) -> bool:
    """ Detect if the given function node is decorated with a property. """
    if not arg_0.decorators:
        return False
    for arg_3 in arg_0.decorators.nodes:
        if not isinstance(arg_3, arg_1.Name):
            continue
        try:
            if _is_property_decorator(arg_3):
                return True
        except arg_1.InferenceError:
            pass
    return False


def Func(arg_0: arg_1.FunctionDef, arg_3: arg_4[arg_5]) -> bool:
    """Determine if the `func` node has a decorator with the qualified name `qname`."""
    arg_6 = arg_0.decorators.nodes if arg_0.decorators else []
    for arg_7 in arg_6:
        try:
            if any(
                arg_8 is not None and arg_8.qname() in arg_3 for arg_8 in arg_7.infer()
            ):
                return True
        except arg_1.InferenceError:
            continue
    return False


def Func(
    arg_0: arg_1.node_classes.NodeNG
) -> Union[arg_1.ExceptHandler, arg_1.TryExcept]:
    """Return the ExceptHandler or the TryExcept node in which the node is."""
    arg_4 = arg_0
    arg_5 = (arg_1.ExceptHandler, arg_1.TryExcept)
    while arg_4 and not isinstance(arg_4.parent, arg_5):
        arg_4 = arg_4.parent

    if arg_4 and isinstance(arg_4.parent, arg_5):
        return arg_4.parent
    return None


def Func(
    arg_0: arg_1.node_classes.NodeNG, arg_4=None
) -> Optional[arg_1.node_classes.NodeNG]:
    """Return the inferred value for the given node.

    Return None if inference failed or if there is some ambiguity (more than
    one node has been inferred).
    """
    try:
        arg_5 = arg_0.infer(arg_4=arg_4)
        arg_6 = next(arg_5)
    except arg_1.InferenceError:
        return None
    try:
        next(arg_5)
        return None  # None if there is ambiguity on the inferred node
    except arg_1.InferenceError:
        return None  # there is some kind of ambiguity
    except StopIteration:
        return arg_6


def Func(arg_0: arg_1.node_classes.NodeNG) -> Optional[type]:
    """Return the inferred type for `node`

    If there is more than one possible type, or if inferred type is Uninferable or None,
    return None
    """
    # check there is only one possible type for the assign node. Else we
    # don't handle it for now
    arg_4 = set()
    try:
        for arg_5 in arg_0.infer():
            if arg_5 == arg_1.Uninferable or is_none(arg_5):
                continue
            arg_4.add(arg_5)
            if len(arg_4) > 1:
                return None
    except arg_1.InferenceError:
        return None
    return arg_4.pop() if arg_4 else None


def Func(arg_0: arg_1.FunctionDef) -> bool:
    """Check if the given function node is a singledispatch function."""

    arg_3 = (
        "functools.singledispatch",
        "singledispatch.singledispatch",
    )

    if not isinstance(arg_0, arg_1.FunctionDef):
        return False

    arg_4 = arg_0.decorators.nodes if arg_0.decorators else []
    for arg_5 in arg_4:
        # func.register are function calls
        if not isinstance(arg_5, arg_1.Call):
            continue

        arg_6 = arg_5.func
        if not isinstance(arg_6, arg_1.Attribute) or arg_6.attrname != "register":
            continue

        try:
            arg_7 = next(arg_6.expr.infer())
        except arg_1.InferenceError:
            continue

        if isinstance(arg_7, arg_1.FunctionDef):
            # pylint: disable=redundant-keyword-arg; some flow inference goes wrong here
            return decorated_with(arg_7, arg_3)

    return False


def Func(arg_0):
    """Split the names of the given module into subparts

    For example,
        Func('pylint.checkers.ImportsChecker')
    returns
        ['pylint', 'pylint.checkers', 'pylint.checkers.ImportsChecker']
    """
    arg_1 = arg_0.split(".")
    return [".".join(arg_1[0 : arg_2 + 1]) for arg_2 in range(len(arg_1))]


def Func(arg_0, arg_1):
    """Get a prepared module name from the given import node

    In the case of relative imports, this will return the
    absolute qualified module name, which might be useful
    for debugging. Otherwise, the initial module name
    is returned unchanged.
    """
    if isinstance(arg_0, astroid.ImportFrom):
        if arg_0.level:
            arg_2 = arg_0.root()
            if isinstance(arg_2, astroid.Module):
                arg_1 = arg_2.relative_to_absolute_name(
                    arg_1, level=arg_0.level
                )
    return arg_1


def Func(arg_0, arg_1=None):
    """return a string which represents imports as a tree"""
    arg_2 = []
    arg_3 = arg_0.items()
    for arg_4, (arg_5, (arg_6, arg_7)) in enumerate(sorted(arg_3, key=lambda x: x[0])):
        if not arg_7:
            arg_7 = ""
        else:
            arg_7 = "(%s)" % ",".join(sorted(arg_7))
        if arg_1 is None:
            arg_2.append("%s %s" % (arg_5, arg_7))
            arg_8 = "  "
        else:
            arg_2.append(r"%s\-%s %s" % (arg_1, arg_5, arg_7))
            if arg_4 == len(arg_3) - 1:
                arg_8 = "%s  " % arg_1
            else:
                arg_8 = "%s| " % arg_1
        if arg_6:
            arg_2.append(Func(arg_6, arg_8))
    return "\n".join(arg_2)


def Func(arg_0, arg_1):
        """triggered when an import statement is seen"""
        arg_0._check_reimport(arg_1)
        arg_0._check_import_as_rename(arg_1)

        arg_2 = arg_1.root()
        arg_3 = [arg_4 for arg_4, _ in arg_1.names]
        if len(arg_3) >= 2:
            arg_0.add_message("multiple-imports", args=", ".join(arg_3), arg_1=arg_1)

        for arg_4 in arg_3:
            arg_0._check_deprecated_module(arg_1, arg_4)
            arg_0._check_preferred_module(arg_1, arg_4)
            arg_5 = arg_0._get_imported_module(arg_1, arg_4)
            if isinstance(arg_1.parent, astroid.Module):
                # Allow imports nested
                arg_0._check_position(arg_1)
            if isinstance(arg_1.scope(), astroid.Module):
                arg_0._record_import(arg_1, arg_5)

            if arg_5 is None:
                continue

            arg_0._check_relative_import(arg_2, arg_1, arg_5, arg_4)
            arg_0._add_imported_module(arg_1, arg_5.name)


def Func(arg_0, arg_1):
        """triggered when a from statement is seen"""
        arg_2 = arg_1.modname
        arg_3 = arg_0._get_imported_module(arg_1, arg_2)

        arg_0._check_import_as_rename(arg_1)
        arg_0._check_misplaced_future(arg_1)
        arg_0._check_deprecated_module(arg_1, arg_2)
        arg_0._check_preferred_module(arg_1, arg_2)
        arg_0._check_wildcard_imports(arg_1, arg_3)
        arg_0._check_same_line_imports(arg_1)
        arg_0._check_reimport(arg_1, arg_2=arg_2, level=arg_1.level)

        if isinstance(arg_1.parent, astroid.Module):
            # Allow imports nested
            arg_0._check_position(arg_1)
        if isinstance(arg_1.scope(), astroid.Module):
            arg_0._record_import(arg_1, arg_3)
        if arg_3 is None:
            return
        arg_4 = arg_1.root()
        arg_0._check_relative_import(arg_4, arg_1, arg_3, arg_2)

        for arg_5, arg_6 in arg_1.names:
            if arg_5 != "*":
                arg_0._add_imported_module(arg_1, "%s.%s" % (arg_3.name, arg_5))
            else:
                arg_0._add_imported_module(arg_1, arg_3.name)


def Func(arg_0, arg_1):
        """Check `node` import or importfrom node position is correct

        Send a message  if `node` comes before another instruction
        """
        # if a first non-import instruction has already been encountered,
        # it means the import comes after it and therefore is not well placed
        if arg_0._first_non_import_node:
            arg_0.add_message("wrong-import-position", arg_1=arg_1, args=arg_1.as_string())


def Func(arg_0, arg_1):
        """Checks imports of module `node` are grouped by category

        Imports must follow this order: standard, 3rd party, local
        """
        arg_2 = []
        arg_3 = []
        arg_4 = []
        # need of a list that holds third or first party ordered import
        arg_5 = []
        arg_6 = []
        arg_7 = []
        arg_8 = []
        arg_9 = []
        arg_10 = isort.SortImports(
            file_contents="",
            known_third_party=arg_0.config.known_third_party,
            known_standard_library=arg_0.config.known_standard_library,
        )
        for arg_11, arg_12 in arg_0._imports_stack:
            if arg_12.startswith("."):
                arg_13 = "." + arg_12.split(".")[1]
            else:
                arg_13 = arg_12.split(".")[0]
            arg_14 = not isinstance(arg_11.parent, astroid.Module)
            arg_15 = not arg_0.linter.is_message_enabled(
                "wrong-import-order", arg_11.fromlineno
            )
            arg_16 = arg_10.place_module(arg_13)
            arg_17 = (arg_11, arg_13)
            if arg_16 in ("FUTURE", "STDLIB"):
                arg_2.append(arg_17)
                arg_18 = (
                    arg_7
                    or arg_8
                    or arg_9
                )
                if arg_0._is_fallback_import(arg_11, arg_18):
                    continue
                if arg_18 and not arg_14:
                    arg_0.add_message(
                        "wrong-import-order",
                        arg_11=arg_11,
                        args=(
                            'standard import "%s"' % arg_11.as_string(),
                            '"%s"' % arg_18[0][0].as_string(),
                        ),
                    )
            elif arg_16 == "THIRDPARTY":
                arg_3.append(arg_17)
                arg_5.append(arg_17)
                if not arg_14 and not arg_15:
                    arg_7.append(arg_17)
                arg_18 = arg_8 or arg_9
                if arg_18 and not arg_14:
                    arg_0.add_message(
                        "wrong-import-order",
                        arg_11=arg_11,
                        args=(
                            'third party import "%s"' % arg_11.as_string(),
                            '"%s"' % arg_18[0][0].as_string(),
                        ),
                    )
            elif arg_16 == "FIRSTPARTY":
                arg_4.append(arg_17)
                arg_5.append(arg_17)
                if not arg_14 and not arg_15:
                    arg_8.append(arg_17)
                arg_18 = arg_9
                if arg_18 and not arg_14:
                    arg_0.add_message(
                        "wrong-import-order",
                        arg_11=arg_11,
                        args=(
                            'first party import "%s"' % arg_11.as_string(),
                            '"%s"' % arg_18[0][0].as_string(),
                        ),
                    )
            elif arg_16 == "LOCALFOLDER":
                arg_6.append((arg_11, arg_13))
                if not arg_14 and not arg_15:
                    arg_9.append((arg_11, arg_13))
        return arg_2, arg_5, arg_6


def Func(arg_0, arg_1, arg_2):
        """notify an imported module, used to analyze dependencies"""
        arg_3 = arg_1.root().file
        arg_4 = arg_1.root().name
        arg_5 = os.path.splitext(os.path.basename(arg_3))[0]

        try:
            arg_2 = astroid.modutils.get_module_part(
                arg_2, arg_3
            )
        except ImportError:
            pass

        if arg_4 == arg_2:
            arg_0.add_message("import-self", arg_1=arg_1)

        elif not astroid.modutils.is_standard_module(arg_2):
            # if this is not a package __init__ module
            if arg_5 != "__init__" and arg_4 not in arg_0._module_pkg:
                # record the module's parent, or the module itself if this is
                # a top level module, as the package it belongs to
                arg_0._module_pkg[arg_4] = arg_4.rsplit(".", 1)[0]

            # handle dependencies
            arg_7 = arg_0.stats["dependencies"].setdefault(
                arg_2, set()
            )
            if arg_4 not in arg_7:
                arg_7.add(arg_4)

            # update import graph
            arg_0.import_graph[arg_4].add(arg_2)
            if not arg_0.linter.is_message_enabled("cyclic-import", line=arg_1.lineno):
                arg_0._excluded_edges[arg_4].add(arg_2)


def Func(arg_0, arg_1, arg_2):
        """check if the module is deprecated"""
        for arg_3 in arg_0.config.deprecated_modules:
            if arg_2 == arg_3 or arg_2.startswith(arg_3 + "."):
                arg_0.add_message("deprecated-module", arg_1=arg_1, args=arg_2)


def Func(arg_0, arg_1, arg_2):
        """check if the module has a preferred replacement"""
        if arg_2 in arg_0.preferred_modules:
            arg_0.add_message(
                "preferred-module",
                arg_1=arg_1,
                args=(arg_0.preferred_modules[arg_2], arg_2),
            )


def Func(arg_0, arg_1, arg_2, arg_3):
        """return a verbatim layout for displaying dependencies"""
        arg_4 = _make_tree_defs(arg_0._external_dependencies_info().items())
        if not arg_4:
            raise EmptyReportError()
        arg_5 = _repr_tree_defs(arg_4)
        arg_1.append(VerbatimText(arg_5))


def Func(arg_0, arg_1):
        """build the internal or the external depedency graph"""
        arg_2 = collections.defaultdict(set)
        for arg_3, arg_4 in arg_0.stats["dependencies"].items():
            for arg_5 in arg_4:
                arg_6 = arg_0._module_pkg.get(arg_5, arg_5)
                arg_7 = arg_3.startswith(arg_6)
                if arg_7 and arg_1 or not arg_7 and not arg_1:
                    arg_2[arg_3].add(arg_5)
        return arg_2


def Func():
    """
    Read config file and return list of options
    """
    arg_0 = []
    arg_1 = os.environ.get("HOME", "")
    if arg_1:
        arg_2 = os.path.join(arg_1, RCFILE)
        try:
            arg_0 = open(arg_2).read().split()
        except IOError:
            pass  # ignore if no config file found
    return arg_0


def Func(arg_0, arg_1):
        """return true if the node should be treated
        """
        arg_2 = get_visibility(getattr(arg_1, "name", arg_1))
        return not arg_0.__mode & VIS_MOD[arg_2]


def Func(arg_0, arg_1):
        """get callbacks from handler for the visited node"""
        arg_2 = arg_1.__class__
        arg_3 = arg_0._cache.get(arg_2)
        if arg_3 is None:
            arg_4 = arg_0.handler
            arg_5 = arg_2.__name__.lower()
            arg_6 = getattr(
                arg_4, "visit_%s" % arg_5, getattr(arg_4, "visit_default", None)
            )
            arg_7 = getattr(
                arg_4, "leave_%s" % arg_5, getattr(arg_4, "leave_default", None)
            )
            arg_0._cache[arg_2] = (arg_6, arg_7)
        else:
            arg_6, arg_7 = arg_3
        return arg_6, arg_7


def Func(arg_0) -> None:
        """Check the consistency of msgid.

        msg ids for a checker should be a string of len 4, where the two first
        characters are the checker id and the two last the msg id in this
        checker.

        :raises InvalidMessageError: If the checker id in the messages are not
        always the same. """
        arg_1 = None
        arg_2 = []
        for arg_3 in arg_0.messages:
            if arg_1 is not None and arg_1 != arg_3.msgid[1:3]:
                arg_4 = "Inconsistent checker part in message id "
                arg_4 += "'{}' (expected 'x{checker_id}xx' ".format(
                    arg_3.msgid, arg_1=arg_1
                )
                arg_4 += "because we already had {existing_ids}).".format(
                    arg_2=arg_2
                )
                raise InvalidMessageError(arg_4)
            arg_1 = arg_3.msgid[1:3]
            arg_2.append(arg_3.msgid)


def Func(arg_0, arg_1):
        """ Check that a datetime was infered.
        If so, emit boolean-datetime warning.
        """
        try:
            arg_2 = next(arg_1.infer())
        except astroid.InferenceError:
            return
        if isinstance(arg_2, Instance) and arg_2.qname() == "datetime.time":
            arg_0.add_message("boolean-datetime", arg_1=arg_1)


def Func(arg_0, arg_1):
        """Manage message of different type and in the context of path."""
        arg_0.messages.append(
            {
                "type": arg_1.category,
                "module": arg_1.module,
                "obj": arg_1.obj,
                "line": arg_1.line,
                "column": arg_1.column,
                "path": arg_1.path,
                "symbol": arg_1.symbol,
                "message": html.escape(arg_1.msg or "", quote=False),
                "message-id": arg_1.msg_id,
            }
        )


def Func(arg_0, arg_1):
        """Launch layouts display"""
        print(json.dumps(arg_0.messages, indent=4), file=arg_0.out)


def Func(arg_0, arg_1):
        """get title for objects"""
        arg_2 = arg_1.name
        if arg_0.module_names:
            arg_2 = "%s.%s" % (arg_1.root().name, arg_2)
        return arg_2


def Func(arg_0):
        """set different default options with _default dictionary"""
        arg_0.module_names = arg_0._set_option(arg_0.config.module_names)
        arg_2 = arg_0._set_option(arg_0.config.all_ancestors)
        arg_3 = arg_0._set_option(arg_0.config.all_associated)
        arg_4, arg_5 = (0, 0)
        if arg_2:
            arg_4 = -1
        if arg_3:
            arg_5 = -1
        if arg_0.config.show_ancestors is not None:
            arg_4 = arg_0.config.show_ancestors
        if arg_0.config.show_associated is not None:
            arg_5 = arg_0.config.show_associated
        arg_0.anc_level, arg_0.association_level = arg_4, arg_5


def Func(arg_0, arg_1):
        """visit one class and add it to diagram"""
        arg_0.linker.visit(arg_1)
        arg_0.classdiagram.add_object(arg_0.get_title(arg_1), arg_1)


def Func(arg_0, arg_1, arg_2):
        """return ancestor nodes of a class node"""
        if arg_2 == 0:
            return
        for arg_3 in arg_1.ancestors(recurs=False):
            if not arg_0.show_node(arg_3):
                continue
            yield arg_3


def Func(arg_0, arg_1, arg_2, arg_3):
        """extract recursively classes related to klass_node"""
        if arg_0.classdiagram.has_node(arg_1) or not arg_0.show_node(arg_1):
            return
        arg_0.add_class(arg_1)

        for arg_4 in arg_0.get_ancestors(arg_1, arg_2):
            arg_0.Func(arg_4, arg_2 - 1, arg_3)

        for arg_5 in arg_0.get_associated(arg_1, arg_3):
            arg_0.Func(arg_5, arg_2, arg_3 - 1)


def Func(arg_0, arg_1):  # pylint: disable=unused-argument
        """leave the pyreverse.utils.Project node

        return the generated diagram definition
        """
        if arg_0.pkgdiagram:
            return arg_0.pkgdiagram, arg_0.classdiagram
        return (arg_0.classdiagram,)


def Func(arg_0, arg_1):
        """visit astroid.ImportFrom  and catch modules for package diagram
        """
        if arg_0.pkgdiagram:
            arg_0.pkgdiagram.add_from_depend(arg_1, arg_1.modname)


def Func(arg_0, arg_1, arg_2):
        """return a class diagram definition for the given klass and its
        related klasses
        """

        arg_0.classdiagram = ClassDiagram(arg_2, arg_0.config.mode)
        if len(arg_1.modules) > 1:
            arg_4, arg_2 = arg_2.rsplit(".", 1)
            arg_4 = arg_1.get_module(arg_4)
        else:
            arg_4 = arg_1.modules[0]
            arg_2 = arg_2.split(".")[-1]
        arg_2 = next(arg_4.ilookup(arg_2))

        arg_5, arg_6 = arg_0._get_levels()
        arg_0.extract_classes(arg_2, arg_5, arg_6)
        return arg_0.classdiagram


def Func(arg_0, arg_1, arg_2):
        """Get the diagrams configuration data

        :param project:The pyreverse project
        :type project: pyreverse.utils.Project
        :param linker: The linker
        :type linker: pyreverse.inspector.Linker(IdGeneratorMixIn, LocalsVisitor)

        :returns: The list of diagram definitions
        :rtype: list(:class:`pylint.pyreverse.diagrams.ClassDiagram`)
        """

        #  read and interpret diagram definitions (Diadefs)
        arg_3 = []
        arg_4 = ClassDiadefGenerator(arg_2, arg_0)
        for arg_5 in arg_0.config.classes:
            arg_3.append(arg_4.class_diagram(arg_1, arg_5))
        if not arg_3:
            arg_3 = DefaultDiadefGenerator(arg_2, arg_0).visit(arg_1)
        for arg_6 in arg_3:
            arg_6.extract_relationships()
        return arg_3


def Func(arg_0, arg_1, arg_2, arg_3):
    """Check if the given owner should be ignored

    This will verify if the owner's module is in *ignored_modules*
    or the owner's module fully qualified name is in *ignored_modules*
    or if the *ignored_modules* contains a pattern which catches
    the fully qualified name of the module.

    Also, similar checks are done for the owner itself, if its name
    matches any name from the *ignored_classes* or if its qualified
    name can be found in *ignored_classes*.
    """
    arg_3 = set(arg_3)
    arg_4 = arg_0.root().name
    arg_5 = arg_0.root().qname()
    if any(
        arg_4 in arg_3
        or arg_5 in arg_3
        or fnmatch.fnmatch(arg_5, arg_6)
        for arg_6 in arg_3
    ):
        return True

    arg_2 = set(arg_2)
    if hasattr(arg_0, "qname"):
        arg_7 = arg_0.qname()
    else:
        arg_7 = ""
    return any(arg_6 in (arg_1, arg_7) for arg_6 in arg_2)


def Func(arg_0, arg_1, arg_2):
    """Check if the given node has a parent of the given type."""
    arg_3 = arg_0.parent
    while not isinstance(arg_3, arg_1) and arg_2.parent_of(arg_3):
        arg_3 = arg_3.parent
    return isinstance(arg_3, arg_1)


def Func(arg_0, arg_1):
    """Check if the given name is used as a variadic argument."""
    return any(
        arg_2.value == arg_0 or arg_2.value.parent_of(arg_0)
        for arg_2 in arg_1
    )


def Func(arg_0, arg_1):
        """
        Check that the given uninferable Call node does not
        call an actual function.
        """
        if not isinstance(arg_1.func, astroid.Attribute):
            return

        # Look for properties. First, obtain
        # the lhs of the Attribute node and search the attribute
        # there. If that attribute is a property or a subclass of properties,
        # then most likely it's not callable.

        # TODO: since astroid doesn't understand descriptors very well
        # we will not handle them here, right now.

        arg_2 = arg_1.func.expr
        arg_3 = safe_infer(arg_2)
        if (
            arg_3 is None
            or arg_3 is astroid.Uninferable
            or not isinstance(arg_3, astroid.Instance)
        ):
            return

        try:
            arg_4 = arg_3._proxied.getattr(arg_1.func.attrname)
        except exceptions.NotFoundError:
            return

        for arg_5 in arg_4:
            if arg_5 is astroid.Uninferable:
                continue
            if not isinstance(arg_5, astroid.FunctionDef):
                continue

            # Decorated, see if it is decorated with a property.
            # Also, check the returns and see if they are callable.
            if decorated_with_property(arg_5):

                try:
                    arg_6 = all(
                        return_node.callable() or return_node is astroid.Uninferable
                        for return_node in arg_5.infer_call_result(arg_1)
                    )
                except astroid.InferenceError:
                    continue

                if not arg_6:
                    arg_0.add_message(
                        "not-callable", arg_1=arg_1, args=arg_1.func.as_string()
                    )
                    break


def Func(arg_0, arg_1):
        """Detect TypeErrors for unary operands."""

        for arg_2 in arg_1.type_errors():
            # Let the error customize its output.
            arg_0.add_message("invalid-unary-operand-type", args=str(arg_2), arg_1=arg_1)


def Func(arg_0, arg_1):
        """visit an astroid.AssignName node

        handle locals_type
        """
        # avoid double parsing done by different Linkers.visit
        # running over the same project:
        if hasattr(arg_1, "_handled"):
            return
        arg_1._handled = True
        if arg_1.name in arg_1.frame():
            arg_3 = arg_1.frame()
        else:
            # the name has been defined as 'global' in the frame and belongs
            # there.
            arg_3 = arg_1.root()
        try:
            if not hasattr(arg_3, "locals_type"):
                # If the frame doesn't have a locals_type yet,
                # it means it wasn't yet visited. Visit it now
                # to add what's missing from it.
                if isinstance(arg_3, astroid.ClassDef):
                    arg_0.visit_classdef(arg_3)
                elif isinstance(arg_3, astroid.FunctionDef):
                    arg_0.visit_functiondef(arg_3)
                else:
                    arg_0.visit_module(arg_3)

            arg_4 = arg_3.locals_type[arg_1.name]
            arg_5 = set(arg_1.infer())
            arg_3.locals_type[arg_1.name] = list(set(arg_4) | arg_5)
        except astroid.InferenceError:
            pass


def Func(arg_0, arg_1):
        """handle an astroid.assignattr node

        handle instance_attrs_type
        """
        try:
            arg_2 = set(arg_0.infer())
            arg_3 = set(arg_1.instance_attrs_type[arg_0.attrname])
            arg_1.instance_attrs_type[arg_0.attrname] = list(arg_3 | arg_2)
        except astroid.InferenceError:
            pass


def Func(arg_0, arg_1, arg_2):
        """return true if the module should be added to dependencies"""
        arg_3 = os.path.dirname(arg_0.project.path)
        if arg_1 == arg_2:
            return 0
        if modutils.is_standard_module(arg_2, (arg_3,)):
            return 1
        return 0


def Func(arg_0, arg_1=None, arg_2=None):
    """colorize message by wrapping it with ansi escape codes

    :type msg: str or unicode
    :param msg: the message string to colorize

    :type color: str or None
    :param color:
      the color identifier (see `ANSI_COLORS` for available values)

    :type style: str or None
    :param style:
      style string (see `ANSI_COLORS` for available values). To get
      several style effects at the same time, use a coma as separator.

    :raise KeyError: if an unexistent color or style identifier is given

    :rtype: str or unicode
    :return: the ansi escaped string
    """
    # If both color and style are not defined, then leave the text as is
    if arg_1 is None and arg_2 is None:
        return arg_0
    arg_3 = _get_ansi_code(arg_1, arg_2)
    # If invalid (or unknown) color, don't wrap msg with ansi codes
    if arg_3:
        return "%s%s%s" % (arg_3, arg_0, ANSI_RESET)
    return arg_0


def Func(arg_0):
    """Register the reporter classes with the linter."""
    arg_0.Func_reporter(TextReporter)
    arg_0.Func_reporter(ParseableTextReporter)
    arg_0.Func_reporter(VSTextReporter)
    arg_0.Func_reporter(ColorizedTextReporter)


def Func(arg_0, arg_1):
        """manage message of different types, and colorize output
        using ansi escape codes
        """
        if arg_1.module not in arg_0._modules:
            arg_2, arg_3 = arg_0._get_decoration("S")
            if arg_1.module:
                arg_4 = colorize_ansi(
                    "************* Module %s" % arg_1.module, arg_2, arg_3
                )
            else:
                arg_4 = colorize_ansi("************* %s" % arg_1.module, arg_2, arg_3)
            arg_0.writeln(arg_4)
            arg_0._modules.add(arg_1.module)
        arg_2, arg_3 = arg_0._get_decoration(arg_1.C)

        arg_1 = arg_1._replace(
            **{
                attr: colorize_ansi(getattr(arg_1, attr), arg_2, arg_3)
                for attr in ("msg", "symbol", "category", "C")
            }
        )
        arg_0.write_message(arg_1)


def Func(arg_0, **arg_1):
        """open a vcg graph
        """
        arg_0._stream.write("%sgraph:{\n" % arg_0._indent)
        arg_0._inc_indent()
        arg_0._write_attributes(GRAPH_ATTRS, **arg_1)


def Func(arg_0, arg_1, **arg_2):
        """draw a Func
        """
        arg_0._stream.write('%sFunc: {title:"%s"' % (arg_0._indent, arg_1))
        arg_0._write_attributes(NODE_ATTRS, **arg_2)
        arg_0._stream.write("}\n")


def Func(arg_0, arg_1, arg_2, arg_3="", **arg_4):
        """draw an Func from a node to another.
        """
        arg_0._stream.write(
            '%s%sFunc: {sourcename:"%s" targetname:"%s"'
            % (arg_0._indent, arg_3, arg_1, arg_2)
        )
        arg_0._write_attributes(EDGE_ATTRS, **arg_4)
        arg_0._stream.write("}\n")


def Func(arg_0, arg_1, arg_2):
        """ Check the new string formatting. """
        # TODO: skip (for now) format nodes which don't have
        #       an explicit string on the left side of the format operation.
        #       We do this because our inference engine can't properly handle
        #       redefinitions of the original string.
        #       For more details, see issue 287.
        #
        # Note that there may not be any left side at all, if the format method
        # has been assigned to another variable. See issue 351. For example:
        #
        #    fmt = 'some string {}'.format
        #    fmt('arg')
        if isinstance(arg_1.func, astroid.Attribute) and not isinstance(
            arg_1.func.expr, astroid.Const
        ):
            return
        if arg_1.starargs or arg_1.kwargs:
            return
        try:
            arg_3 = next(arg_2.bound.infer())
        except astroid.InferenceError:
            return
        if not (isinstance(arg_3, astroid.Const) and isinstance(arg_3.value, str)):
            return
        try:
            arg_4 = CallSite.from_call(arg_1)
        except astroid.InferenceError:
            return

        try:
            arg_5, arg_6, arg_7 = utils.parse_format_method_string(
                arg_3.value
            )
        except utils.IncompleteFormatString:
            arg_0.add_message("bad-format-string", arg_1=arg_1)
            return

        arg_8 = arg_4.positional_arguments
        arg_9 = arg_4.keyword_arguments
        arg_10 = {arg_12[0] for arg_12 in arg_5 if isinstance(arg_12[0], str)}
        if arg_6 and arg_7:
            arg_0.add_message("format-combined-specification", arg_1=arg_1)
            return

        arg_11 = False
        # Consider "{[0]} {[1]}" as num_args.
        arg_6 += sum(1 for arg_12 in arg_10 if arg_12 == "")
        if arg_10:
            for arg_12 in arg_10:
                if arg_12 and arg_12 not in arg_9:
                    arg_0.add_message(
                        "missing-format-argument-key", arg_1=arg_1, args=(arg_12,)
                    )
            for arg_12 in arg_9:
                if arg_12 not in arg_10:
                    arg_0.add_message(
                        "unused-format-string-argument", arg_1=arg_1, args=(arg_12,)
                    )
            # num_args can be 0 if manual_pos is not.
            arg_6 = arg_6 or arg_7
            if arg_8 or arg_6:
                arg_13 = any(True for arg_12 in arg_10 if arg_12 == "")
                if arg_9 or arg_13:
                    # Verify the required number of positional arguments
                    # only if the .format got at least one keyword argument.
                    # This means that the format strings accepts both
                    # positional and named fields and we should warn
                    # when one of the them is missing or is extra.
                    arg_11 = True
        else:
            arg_11 = True
        if arg_11:
            # num_args can be 0 if manual_pos is not.
            arg_6 = arg_6 or arg_7
            if len(arg_8) > arg_6:
                arg_0.add_message("too-many-format-args", arg_1=arg_1)
            elif len(arg_8) < arg_6:
                arg_0.add_message("too-few-format-args", arg_1=arg_1)

        arg_0._detect_vacuous_formatting(arg_1, arg_8)
        arg_0.Func_specifiers(arg_1, arg_5, arg_9)


def Func(arg_0, arg_1, arg_2, arg_3):
        """check for bad escapes in a non-raw string.

        prefix: lowercase string of eg 'ur' string prefix markers.
        string_body: the un-parsed body of the string, not including the quote
        marks.
        start_row: integer line number in the source.
        """
        # Walk through the string; if we see a backslash then escape the next
        # character, and skip over it.  If we see a non-escaped character,
        # alert, and continue.
        #
        # Accept a backslash when it escapes a backslash, or a quote, or
        # end-of-line, or one of the letters that introduce a special escape
        # sequence <http://docs.python.org/reference/lexical_analysis.html>
        #
        # TODO(mbp): Maybe give a separate warning about the rarely-used
        # \a \b \v \f?
        #
        # TODO(mbp): We could give the column of the problem character, but
        # add_message doesn't seem to have a way to pass it through at present.
        arg_4 = 0
        while True:
            arg_4 = arg_2.find("\\", arg_4)
            if arg_4 == -1:
                break
            # There must be a next character; having a backslash at the end
            # of the string would be a SyntaxError.
            arg_5 = arg_2[arg_4 + 1]
            arg_6 = arg_2[arg_4 : arg_4 + 2]
            if arg_5 in arg_0.UNICODE_ESCAPE_CHARACTERS:
                if "u" in arg_1:
                    pass
                elif (_PY3K or arg_0._unicode_literals) and "b" not in arg_1:
                    pass  # unicode by default
                else:
                    arg_0.add_message(
                        "anomalous-unicode-escape-in-string",
                        line=arg_3,
                        args=(arg_6,),
                    )
            elif arg_5 not in arg_0.ESCAPE_CHARACTERS:
                arg_0.add_message(
                    "anomalous-backslash-in-string", line=arg_3, args=(arg_6,)
                )
            # Whether it was a valid escape or not, backslash followed by
            # another character can always be consumed whole: the second
            # character can never be the start of a new backslash escape.
            arg_4 += 2


def Func(arg_0, arg_1):
        """display a section as text
        """
        arg_0.section += 1
        arg_0.writeln()
        arg_0.format_children(arg_1)
        arg_0.section -= 1
        arg_0.writeln()


def Func(arg_0, arg_1):
        """Display an evaluation section as a text."""
        arg_0.section += 1
        arg_0.format_children(arg_1)
        arg_0.section -= 1
        arg_0.writeln()


def Func(arg_0, arg_1):
        """Register a MessageDefinition with consistency in mind.

        :param MessageDefinition message: The message definition being added.
        """
        arg_0._check_id_and_symbol_consistency(arg_1.msgid, arg_1.symbol)
        arg_0._check_symbol(arg_1.msgid, arg_1.symbol)
        arg_0._check_msgid(arg_1.msgid, arg_1.symbol)
        for arg_2 in arg_1.old_names:
            arg_0._check_symbol(arg_1.msgid, arg_2[1])
        arg_0._messages_definitions[arg_1.symbol] = arg_1
        arg_0._register_alternative_name(arg_1, arg_1.msgid, arg_1.symbol)
        for arg_5, arg_6 in arg_1.old_names:
            arg_0._register_alternative_name(arg_1, arg_5, arg_6)
        arg_0._msgs_by_category[arg_1.msgid[0]].append(arg_1.msgid)


def Func(arg_0, arg_1, arg_2):
        """Check that a symbol is not already used. """
        arg_3 = arg_0._messages_definitions.get(arg_2)
        if arg_3:
            arg_0._raise_duplicate_msg_id(arg_2, arg_1, arg_3.msgid)
        else:
            arg_4 = None
        arg_5 = arg_0._alternative_names.get(arg_2)
        if arg_5:
            if arg_5.symbol == arg_2:
                arg_4 = arg_5.msgid
            else:
                for arg_6, arg_7 in arg_5.old_names:
                    if arg_7 == arg_2:
                        arg_4 = arg_6
                        break
            if arg_1 != arg_4:
                arg_0._raise_duplicate_msg_id(arg_2, arg_1, arg_4)


def Func(arg_0, arg_1, arg_2):
        """Raise an error when a symbol is duplicated.

        :param str msgid: The msgid corresponding to the symbols
        :param str symbol: Offending symbol
        :param str other_symbol: Other offending symbol
        :raises InvalidMessageError: when a symbol is duplicated.
        """
        arg_3 = [arg_1, arg_2]
        arg_3.sort()
        arg_4 = "Message id '{msgid}' cannot have both ".format(arg_0=arg_0)
        arg_4 += "'{other_symbol}' and '{symbol}' as symbolic name.".format(
            arg_2=arg_3[0], arg_1=arg_3[1]
        )
        raise InvalidMessageError(arg_4)


def Func(arg_0, arg_1, arg_2):
        """Raise an error when a msgid is duplicated.

        :param str symbol: The symbol corresponding to the msgids
        :param str msgid: Offending msgid
        :param str other_msgid: Other offending msgid
        :raises InvalidMessageError: when a msgid is duplicated.
        """
        arg_3 = [arg_1, arg_2]
        arg_3.sort()
        arg_4 = "Message symbol '{symbol}' cannot be used for ".format(
            arg_0=arg_0
        )
        arg_4 += "'{other_msgid}' and '{msgid}' at the same time.".format(
            arg_2=arg_3[0], arg_1=arg_3[1]
        )
        raise InvalidMessageError(arg_4)


def Func(arg_0, arg_1):
        """Generates a user-consumable representation of a message.

        Can be just the message ID or the ID and the symbol.
        """
        arg_2 = arg_0.get_message_definitions(arg_1)
        if len(arg_2) == 1:
            return repr(arg_2[0].symbol)
        return repr([arg_3.symbol for arg_3 in arg_2])


def Func(arg_0):
        """Output full messages list documentation in ReST format. """
        arg_1 = sorted(arg_0._messages_definitions.values(), key=lambda m: m.msgid)
        for arg_2 in arg_1:
            if not arg_2.may_be_emitted():
                continue
            print(arg_2.format_help(checkerref=False))
        print("")


def Func(arg_0):
    """Output full documentation in ReST format for all extension modules"""
    # PACKAGE/docs/exts/pylint_extensions.py --> PACKAGE/
    arg_1 = os.path.dirname(
        os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
    )
    # PACKAGE/ --> PACKAGE/pylint/extensions
    arg_2 = os.path.join(arg_1, "pylint", "extensions")
    arg_3 = []
    arg_4 = {}
    for arg_5 in os.listdir(arg_2):
        arg_6, arg_7 = os.path.splitext(arg_5)
        if arg_6[0] == "_" or arg_6 in DEPRECATED_MODULES:
            continue
        if arg_7 == ".py":
            arg_3.append("pylint.extensions.%s" % arg_6)
        elif arg_7 == ".rst":
            arg_4["pylint.extensions." + arg_6] = os.path.join(arg_2, arg_5)
    arg_3.sort()
    if not arg_3:
        sys.exit("No Pylint extensions found?")

    arg_8 = PyLinter()
    arg_8.load_plugin_modules(arg_3)

    arg_9 = os.path.join(
        arg_1, "doc", "technical_reference", "extensions.rst"
    )
    with open(arg_9, "w") as stream:
        stream.write("Optional Pylint checkers in the extensions module\n")
        stream.write("=================================================\n\n")
        stream.write("Pylint provides the following optional plugins:\n\n")
        for arg_10 in arg_3:
            stream.write("- :ref:`{}`\n".format(arg_10))
        stream.write("\n")
        stream.write(
            "You can activate any or all of these extensions "
            "by adding a ``load-plugins`` line to the ``MASTER`` "
            "section of your ``.pylintrc``, for example::\n"
        )
        stream.write(
            "\n    load-plugins=pylint.extensions.docparams,"
            "pylint.extensions.docstyle\n\n"
        )
        arg_11 = get_plugins_info(arg_8, arg_4)
        for arg_10, arg_12 in sorted(arg_11.items()):
            arg_8._print_checker_doc(arg_12["name"], arg_12, stream=stream)


def Func() -> int:
    """Use sched_affinity if available for virtualized or containerized environments."""
    arg_0 = getattr(os, "sched_getaffinity", None)
    # pylint: disable=not-callable,using-constant-test
    if arg_0:
        return len(arg_0(0))
    if multiprocessing:
        return multiprocessing.cpu_count()
    return 1


def Func(arg_0, arg_1):
        """take a list of module names which are pylint plugins and load
        and register them
        """
        for arg_2 in arg_1:
            if arg_2 in arg_0._dynamic_plugins:
                continue
            arg_0._dynamic_plugins.add(arg_2)
            arg_3 = modutils.load_module_from_name(arg_2)
            arg_3.register(arg_0)


def Func(arg_0, arg_1, arg_2, arg_3=None, arg_4=None):
        """overridden from config.OptionsProviderMixin to handle some
        special options
        """
        if arg_1 in arg_0._options_methods or arg_1 in arg_0._bw_options_methods:
            if arg_2:
                try:
                    arg_5 = arg_0._options_methods[arg_1]
                except KeyError:
                    arg_5 = arg_0._bw_options_methods[arg_1]
                    warnings.warn(
                        "%s is deprecated, replace it by %s"
                        % (arg_1, arg_1.split("-")[0]),
                        DeprecationWarning,
                    )
                arg_2 = utils._check_csv(arg_2)
                if isinstance(arg_2, (list, tuple)):
                    for arg_6 in arg_2:
                        arg_5(arg_6, ignore_unknown=True)
                else:
                    arg_5(arg_2)
                return  # no need to call Func, disable/enable methods do it
        elif arg_1 == "output-format":
            arg_0._reporter_name = arg_2
            # If the reporters are already available, load
            # the reporter class.
            if arg_0._reporters:
                arg_0._load_reporter()

        try:
            checkers.BaseTokenChecker.Func(arg_0, arg_1, arg_2, arg_3, arg_4)
        except config.UnsupportedAction:
            print("option %s can't be read from config file" % arg_1, file=sys.stderr)


def Func(arg_0):
        """disable all reporters"""
        for arg_1 in arg_0._reports.values():
            for arg_2, arg_3, arg_3 in arg_1:
                arg_0.disable_report(arg_2)


def Func(arg_0):
        """Disable all other checkers and enable Python 3 warnings."""
        arg_0.disable("all")
        arg_0.enable("python3")
        if arg_0._error_mode:
            # The error mode was activated, using the -E flag.
            # So we'll need to enable only the errors from the
            # Python 3 porting checker.
            for arg_1 in arg_0._checker_messages("python3"):
                if arg_1.startswith("E"):
                    arg_0.enable(arg_1)
                else:
                    arg_0.disable(arg_1)
        arg_2 = arg_0.cfgfile_parser
        if arg_2.has_option("MESSAGES CONTROL", "disable"):
            arg_3 = arg_2.get("MESSAGES CONTROL", "disable")
            arg_0.global_set_option("disable", arg_3)
        arg_0._Func = True


def Func(arg_0):
        """return all available checkers as a list"""
        return [arg_0] + [
            arg_2
            for arg_1 in arg_0._checkers.values()
            for arg_2 in arg_1
            if arg_2 is not arg_0
        ]


def Func(arg_0):
        """Get all the checker names that this linter knows about."""
        arg_1 = arg_0.get_checkers()
        return sorted(
            {arg_2.name for arg_2 in arg_1 if arg_2.name != "master"}
        )


def Func(arg_0):
        """return checkers needed for activated messages and reports"""
        if not arg_0.config.reports:
            arg_0.disable_reporters()
        # get needed checkers
        arg_1 = [arg_0]
        for arg_2 in arg_0.get_checkers()[1:]:
            arg_3 = {msg for msg in arg_2.msgs if arg_0.is_message_enabled(msg)}
            if arg_3 or any(arg_0.report_is_enabled(arg_4[0]) for arg_4 in arg_2.reports):
                arg_1.append(arg_2)
        # Sort checkers by priority
        arg_1 = sorted(
            arg_1, key=operator.attrgetter("priority"), reverse=True
        )
        return arg_1


def Func(arg_0, arg_1):
        """get modules and errors from a list of modules and handle errors
        """
        arg_2, arg_3 = utils.expand_modules(
            arg_1, arg_0.config.black_list, arg_0.config.black_list_re
        )
        for arg_4 in arg_3:
            arg_5 = modname = arg_4["mod"]
            arg_6 = arg_4["key"]
            arg_0.set_current_module(modname)
            if arg_6 == "fatal":
                arg_5 = str(arg_4["ex"]).replace(os.getcwd() + os.sep, "")
            arg_0.add_message(arg_6, args=arg_5)
        return arg_2


def Func(arg_0, arg_1, arg_2=None):
        """set the name of the currently analyzed module and
        init statistics for it
        """
        if not arg_1 and arg_2 is None:
            return
        arg_0.reporter.on_Func(arg_1, arg_2)
        arg_0.current_name = arg_1
        arg_0.current_file = arg_2 or arg_1
        arg_0.stats["by_module"][arg_1] = {}
        arg_0.stats["by_module"][arg_1]["statement"] = 0
        for arg_6 in MSG_TYPES.values():
            arg_0.stats["by_module"][arg_1][arg_6] = 0


def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
        """Check a module from its astroid representation."""
        try:
            arg_5 = utils.tokenize_module(arg_1)
        except tokenize.TokenError as ex:
            arg_0.add_message("syntax-error", line=ex.args[1][0], args=ex.args[0])
            return None

        if not arg_1.pure_python:
            arg_0.add_message("raw-checker-failed", args=arg_1.name)
        else:
            # assert astroid.file.endswith('.py')
            # invoke ITokenChecker interface on self to fetch module/block
            # level options
            arg_0.process_tokens(arg_5)
            if arg_0._ignore_file:
                return False
            # walk ast to collect line numbers
            arg_0.file_state.collect_block_lines(arg_0.msgs_store, arg_1)
            # run raw and tokens checkers
            for arg_6 in arg_3:
                arg_6.process_module(arg_1)
            for arg_6 in arg_4:
                arg_6.process_tokens(arg_5)
        # generate events to astroid checkers
        arg_2.walk(arg_1)
        return True


def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
        """optik callback for printing some help about a particular message"""
        arg_0.linter.msgs_store.help_message(utils._splitstrip(arg_3))
        sys.exit(0)


def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
        """optik callback for printing full documentation"""
        arg_0.linter.print_full_documentation()
        sys.exit(0)


def Func(arg_0, arg_1=80, arg_2=""):
    """Wrap the text on the given line length."""
    return "\n".join(
        textwrap.wrap(
            arg_0, width=arg_1, initial_indent=arg_2, subsequent_indent=arg_2
        )
    )


def Func(arg_0, arg_1, *arg_2, **arg_3):
    """return decoded line from encoding or decode with default encoding"""
    try:
        return arg_0.decode(arg_1 or sys.getdefaultencoding(), *arg_2, **arg_3)
    except LookupError:
        return arg_0.decode(sys.getdefaultencoding(), *arg_2, **arg_3)


def Func(arg_0, arg_1):
    """Determines if the basename is matched in a regex blacklist

    :param str base_name: The basename of the file
    :param list black_list_re: A collection of regex patterns to match against.
        Successful matches are blacklisted.

    :returns: `True` if the basename is blacklisted, `False` otherwise.
    :rtype: bool
    """
    for arg_2 in arg_1:
        if arg_2.match(arg_0):
            return True
    return False


def Func(arg_0, arg_1):
    """load all module and package in the given directory, looking for a
    'register' function in each one, used to register pylint checkers
    """
    arg_2 = {}
    for arg_3 in listdir(arg_1):
        arg_4, arg_5 = splitext(arg_3)
        if arg_4 in arg_2 or arg_4 == "__pycache__":
            continue
        if (
            arg_5 in PY_EXTS
            and arg_4 != "__init__"
            or (not arg_5 and isdir(join(arg_1, arg_4)))
        ):
            try:
                arg_6 = modutils.load_module_from_file(join(arg_1, arg_3))
            except ValueError:
                # empty module name (usually emacs auto-save files)
                continue
            except ImportError as exc:
                print(
                    "Problem importing module %s: %s" % (arg_3, exc), file=sys.stderr
                )
            else:
                if hasattr(arg_6, "register"):
                    arg_6.register(arg_0)
                    arg_2[arg_4] = 1


def Func(arg_0):
    """return string as a comment"""
    arg_1 = [line.strip() for line in arg_0.splitlines()]
    return "# " + ("%s# " % linesep).join(arg_1)


def Func(arg_0, arg_1, arg_2, arg_3=None):
    """format an options section using the INI format"""
    if arg_3:
        print(_comment(arg_3), file=arg_0)
    print("[%s]" % arg_1, file=arg_0)
    _ini_format(arg_0, arg_2)


def Func(arg_0, arg_1):
    """format options using the INI format"""
    for arg_2, arg_3, arg_4 in arg_1:
        arg_4 = _format_option_value(arg_3, arg_4)
        arg_5 = arg_3.get("help")
        if arg_5:
            arg_5 = normalize_text(arg_5, line_len=79, indent="# ")
            print(file=arg_0)
            print(arg_5, file=arg_0)
        else:
            print(file=arg_0)
        if arg_4 is None:
            print("#%s=" % arg_2, file=arg_0)
        else:
            arg_4 = str(arg_4).strip()
            if re.match(r"^([\w-]+,)+[\w-]+$", str(arg_4)):
                arg_6 = "\n " + " " * len(arg_2)
                arg_4 = arg_6.join(x + "," for x in str(arg_4).split(","))
                # remove trailing ',' from last element of the list
                arg_4 = arg_4[:-1]
            print("%s=%s" % (arg_2, arg_4), file=arg_0)


def Func(arg_0, arg_1):
        """overridden to detect problems easily"""
        assert arg_1 not in arg_0.parents()
        VNode.Func(arg_0, arg_1)


def Func(arg_0):
        """return the ancestor nodes"""
        assert arg_0.parent is not arg_0
        if arg_0.parent is None:
            return []
        return [arg_0.parent] + arg_0.parent.Func()


def Func(arg_0, arg_1):
        """trick to get table content without actually writing it

        return an aligned list of lists containing table cells values as string
        """
        arg_2 = [[]]
        arg_3 = arg_1.cols
        for arg_4 in arg_0.compute_content(arg_1):
            if arg_3 == 0:
                arg_2.append([])
                arg_3 = arg_1.cols
            arg_3 -= 1
            arg_2[-1].append(arg_4)
        # fill missing cells
        while len(arg_2[-1]) < arg_3:
            arg_2[-1].append("")
        return arg_2


def Func(arg_0, arg_1, arg_2):
        """Walk the AST to collect block level options line numbers."""
        for arg_3, arg_4 in arg_0._module_msgs_state.items():
            arg_0._raw_module_msgs_state[arg_3] = arg_4.copy()
        arg_6 = arg_0._module_msgs_state.copy()
        arg_0._module_msgs_state = {}
        arg_0._suppression_mapping = {}
        arg_0._effective_max_line_number = arg_2.tolineno
        arg_0._Func(arg_1, arg_2, arg_6)


def Func(
        arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6
    ):  # pylint: disable=unused-argument
        """Report an ignored message.

        state_scope is either MSG_STATE_SCOPE_MODULE or MSG_STATE_SCOPE_CONFIG,
        depending on whether the message was disabled locally in the module,
        or globally. The other arguments are the same as for add_message.
        """
        if arg_1 == MSG_STATE_SCOPE_MODULE:
            try:
                arg_7 = arg_0._suppression_mapping[(arg_2, arg_3)]
                arg_0._ignored_msgs[(arg_2, arg_7)].add(arg_3)
            except KeyError:
                pass


def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
        """register a report

        reportid is the unique identifier for the report
        r_title the report's title
        r_cb the method to call to make the report
        checker is the checker defining the report
        """
        arg_1 = arg_1.upper()
        arg_0._reports[arg_4].append((arg_1, arg_2, arg_3))


def Func(arg_0, arg_1, arg_2):
        """render registered reports"""
        arg_3 = Section("Report", "%s statements analysed." % (arg_0.stats["statement"]))
        for arg_4 in arg_0.report_order():
            for arg_5, arg_6, arg_7 in arg_0._reports[arg_4]:
                if not arg_0.report_is_enabled(arg_5):
                    continue
                arg_8 = Section(arg_6)
                try:
                    arg_7(arg_8, arg_1, arg_2)
                except EmptyReportError:
                    continue
                arg_8.report_id = arg_5
                arg_3.append(arg_8)
        return arg_3


def Func(arg_0):
    """Get the name of the property that the given node is a setter for.

    :param node: The node to get the property name for.
    :type node: str

    :rtype: str or None
    :returns: The name of the property that the node is a setter for,
        or None if one could not be found.
    """
    arg_1 = arg_0.decorators.nodes if arg_0.decorators else []
    for arg_2 in arg_1:
        if (
            isinstance(arg_2, astroid.Attribute)
            and arg_2.attrname == "setter"
            and isinstance(arg_2.expr, astroid.Name)
        ):
            return arg_2.expr.name
    return None


def Func(arg_0):
    """Get the property node for the given setter node.

    :param node: The node to get the property for.
    :type node: astroid.FunctionDef

    :rtype: astroid.FunctionDef or None
    :returns: The node relating to the property of the given setter node,
        or None if one could not be found.
    """
    arg_1 = None

    arg_2 = Func_name(arg_0)
    arg_3 = utils.node_frame_class(arg_0)
    if arg_2 and arg_3:
        arg_4 = arg_3.getattr(arg_0.name)
        for arg_5 in arg_4:
            if utils.decorated_with_property(arg_5):
                arg_1 = arg_5
                break

    return arg_1


def Func(arg_0):
    """Check if a return node returns a value other than None.

    :param return_node: The return node to check.
    :type return_node: astroid.Return

    :rtype: bool
    :return: True if the return node returns a value other than None,
        False otherwise.
    """
    arg_1 = arg_0.value

    if arg_1 is None:
        return False

    return not (isinstance(arg_1, astroid.Const) and arg_1.value is None)


def Func(arg_0):
    """
    Gets all of the possible raised exception types for the given raise node.

    .. note::

        Caught exception types are ignored.

    :param node: The raise node to find exception types for.
    :type node: astroid.node_classes.NodeNG

    :returns: A list of exception types possibly raised by :param:`node`.
    :rtype: set(str)
    """
    arg_1 = []
    if isinstance(arg_0.exc, astroid.Name):
        arg_2 = utils.safe_infer(arg_0.exc)
        if arg_2:
            arg_1 = [arg_2.name]
    elif arg_0.exc is None:
        arg_3 = arg_0.parent
        while arg_3 and not isinstance(arg_3, astroid.ExceptHandler):
            arg_3 = arg_3.parent

        if arg_3 and arg_3.type:
            arg_4 = astroid.unpack_infer(arg_3.type)
            arg_1 = (arg_8.name for arg_8 in arg_4 if arg_8 is not astroid.Uninferable)
    else:
        arg_5 = _get_raise_target(arg_0)
        if isinstance(arg_5, astroid.ClassDef):
            arg_1 = [arg_5.name]
        elif isinstance(arg_5, astroid.FunctionDef):
            for arg_6 in arg_5.nodes_of_class(astroid.Return):
                if arg_6.frame() != arg_5:
                    # return from inner function - ignore it
                    continue

                arg_7 = utils.safe_infer(arg_6.value)
                if (
                    arg_7
                    and isinstance(arg_7, (astroid.Instance, astroid.ClassDef))
                    and utils.inherit_from_std_ex(arg_7)
                ):
                    arg_1.append(arg_7.name)

    try:
        return {arg_8 for arg_8 in arg_1 if not utils.node_ignores_exception(arg_0, arg_8)}
    except astroid.InferenceError:
        return set()


def Func(arg_0, arg_1):
        """inspect the source file to find messages activated or deactivated by id."""
        arg_2 = MessagesHandlerMixIn.get_by_id_managed_msgs()
        for (arg_3, arg_4, arg_5, arg_6, arg_7) in arg_2:
            if arg_3 == arg_1.name:
                if arg_7:
                    arg_8 = "Id '{ident}' is used to disable '{symbol}' message emission".format(
                        ident=arg_4, symbol=arg_5
                    )
                else:
                    arg_8 = "Id '{ident}' is used to enable '{symbol}' message emission".format(
                        ident=arg_4, symbol=arg_5
                    )
                arg_0.add_message("use-symbolic-message-instead", line=arg_6, args=arg_8)
        MessagesHandlerMixIn.clear_by_id_managed_msgs()


def Func(arg_0, arg_1):
        """inspect the source file to find encoding problem"""
        if arg_1.file_encoding:
            arg_2 = arg_1.file_encoding
        else:
            arg_2 = "ascii"

        with arg_1.stream() as stream:
            for arg_3, arg_4 in enumerate(stream):
                arg_0._check_encoding(arg_3 + 1, arg_4, arg_2)


def Func(arg_0, arg_1):
        """inspect the source to find fixme problems"""
        if not arg_0.config.notes:
            return
        arg_2 = (
            token_info for token_info in arg_1 if token_info.type == tokenize.COMMENT
        )
        for arg_3 in arg_2:
            arg_4 = arg_3.string[1:].lstrip()  # trim '#' and whitespaces

            # handle pylint disable clauses
            arg_5 = OPTION_RGX.search(arg_4)
            if arg_5:
                try:
                    arg_6, arg_7 = arg_5.group(1).split("=", 1)
                    arg_8 = [_val.strip().upper() for _val in arg_7.split(",")]
                    if set(arg_8) & set(arg_0.config.notes):
                        continue
                except ValueError:
                    arg_0.add_message(
                        "bad-inline-option",
                        args=arg_5.group(1).strip(),
                        line=arg_3.string,
                    )
                    continue

            # emit warnings if necessary
            arg_9 = arg_0._fixme_pattern.search("#" + arg_4.lower())
            if arg_9:
                arg_10 = arg_9.group(1)
                arg_0.add_message(
                    "fixme",
                    col_offset=arg_3.string.lower().index(arg_10.lower()),
                    args=arg_4,
                    line=arg_3.start[0],
                )


def Func(arg_0, arg_1):
    """Check if the name is a future import from another module."""
    try:
        arg_2 = arg_0.do_import_module(arg_0.modname)
    except astroid.AstroidBuildingException:
        return None

    for arg_3 in arg_2.locals.get(arg_1, []):
        if isinstance(arg_3, astroid.ImportFrom) and arg_3.modname == FUTURE:
            return True
    return None


def Func(arg_0, arg_1):
    """get overridden method if any"""
    try:
        arg_2 = next(arg_0.local_attr_ancestors(arg_1))
    except (StopIteration, KeyError):
        return None
    try:
        arg_3 = arg_2[arg_1]
    except KeyError:
        # We have found an ancestor defining <name> but it's not in the local
        # dictionary. This may happen with astroid built from living objects.
        return None
    if isinstance(arg_3, astroid.FunctionDef):
        return arg_3
    return None


def Func(arg_0, arg_1):
    """return extra information to add to the message for unpacking-non-sequence
    and unbalanced-tuple-unpacking errors
    """
    arg_2 = ""
    arg_3 = arg_1.root().name
    if arg_0.root().name == arg_3:
        if arg_0.lineno == arg_1.lineno:
            arg_2 = " %s" % arg_1.as_string()
        elif arg_1.lineno:
            arg_2 = " defined at line %s" % arg_1.lineno
    elif arg_1.lineno:
        arg_2 = " defined at line %s of %s" % (arg_1.lineno, arg_3)
    return arg_2


def Func(arg_0, arg_1, arg_2):
    """ Detect that the given frames shares a global
    scope.

    Two frames shares a global scope when neither
    of them are hidden under a function scope, as well
    as any of parent scope of them, until the root scope.
    In this case, depending from something defined later on
    will not work, because it is still undefined.

    Example:
        class A:
            # B has the same global scope as `C`, leading to a NameError.
            class B(C): ...
        class C: ...

    """
    arg_3 = arg_4 = None
    if arg_1 and arg_1.parent:
        arg_4 = arg_1.parent.scope()
    if arg_2 and arg_2.parent:
        arg_3 = arg_2.parent.scope()
    if isinstance(arg_1, astroid.FunctionDef):
        # If the parent of the current node is a
        # function, then it can be under its scope
        # (defined in, which doesn't concern us) or
        # the `->` part of annotations. The same goes
        # for annotations of function arguments, they'll have
        # their parent the Arguments node.
        if not isinstance(arg_0.parent, (astroid.FunctionDef, astroid.Arguments)):
            return False
    elif any(
        not isinstance(arg_5, (astroid.ClassDef, astroid.Module)) for arg_5 in (arg_1, arg_2)
    ):
        # Not interested in other frames, since they are already
        # not in a global scope.
        return False

    arg_6 = []
    for arg_7 in (arg_4, arg_3):
        # Look for parent scopes. If there is anything different
        # than a module or a class scope, then they frames don't
        # share a global scope.
        arg_8 = arg_7
        while arg_8:
            if not isinstance(arg_8, (astroid.ClassDef, astroid.Module)):
                arg_6.append(arg_8)
                break
            if arg_8.parent:
                arg_8 = arg_8.parent.scope()
            else:
                break
    if arg_6 and len(set(arg_6)) != 1:
        # Store different scopes than expected.
        # If the stored scopes are, in fact, the very same, then it means
        # that the two frames (frame and defframe) shares the same scope,
        # and we could apply our lineno analysis over them.
        # For instance, this works when they are inside a function, the node
        # that uses a definition and the definition itself.
        return False
    # At this point, we are certain that frame and defframe shares a scope
    # and the definition of the first depends on the second.
    return arg_1.lineno < arg_2.lineno


def Func(arg_0, arg_1):
        """
        Return True if the node is in a local class scope, as an assignment.

        :param node: Node considered
        :type node: astroid.Node
        :return: True if the node is in a local class scope, as an assignment. False otherwise.
        :rtype: bool
        """
        # Detect if we are in a local class scope, as an assignment.
        # For example, the following is fair game.
        #
        # class A:
        #    b = 1
        #    c = lambda b=b: b * b
        #
        # class B:
        #    tp = 1
        #    def func(self, arg: tp):
        #        ...
        # class C:
        #    tp = 2
        #    def func(self, arg=tp):
        #        ...

        arg_2 = arg_1.name
        arg_3 = arg_1.statement().scope()
        arg_4 = arg_0._defined_in_function_definition(arg_1, arg_3)
        if arg_4:
            arg_5 = arg_3.parent.scope().locals
        else:
            arg_5 = arg_3.locals
        return not (
            (isinstance(arg_3, astroid.ClassDef) or arg_4)
            and arg_2 in arg_5
        )


def Func(arg_0, arg_1, arg_2):
        """
        Return True if there is a node with the same name in the to_consume dict of an upper scope
        and if that scope is a function

        :param node: node to check for
        :type node: astroid.Node
        :param index: index of the current consumer inside self._to_consume
        :type index: int
        :return: True if there is a node with the same name in the to_consume dict of an upper scope
                 and if that scope is a function
        :rtype: bool
        """
        for arg_3 in arg_0._to_consume[arg_2 - 1 :: -1]:
            if arg_3.scope_type == "function" and arg_1.name in arg_3.to_consume:
                return True
        return False


def Func(arg_0, arg_1, arg_2, arg_3):
        """ Check for unbalanced tuple unpacking
        and unpacking non sequences.
        """
        if utils.is_inside_abstract_class(arg_2):
            return
        if utils.is_comprehension(arg_2):
            return
        if arg_1 is astroid.Uninferable:
            return
        if (
            isinstance(arg_1.parent, astroid.Arguments)
            and isinstance(arg_2.value, astroid.Name)
            and arg_2.value.name == arg_1.parent.vararg
        ):
            # Variable-length argument, we can't determine the length.
            return
        if isinstance(arg_1, (astroid.Tuple, astroid.List)):
            # attempt to check unpacking is properly balanced
            arg_4 = arg_1.itered()
            if len(arg_3) != len(arg_4):
                # Check if we have starred nodes.
                if any(isinstance(arg_5, astroid.Starred) for arg_5 in arg_3):
                    return
                arg_0.add_message(
                    "unbalanced-tuple-unpacking",
                    arg_2=arg_2,
                    args=(
                        _get_unpacking_extra_info(arg_2, arg_1),
                        len(arg_3),
                        len(arg_4),
                    ),
                )
        # attempt to check unpacking may be possible (ie RHS is iterable)
        else:
            if not utils.is_iterable(arg_1):
                arg_0.add_message(
                    "unpacking-non-sequence",
                    arg_2=arg_2,
                    args=(_get_unpacking_extra_info(arg_2, arg_1),),
                )


def Func(arg_0, arg_1):
        """ Update consumption analysis for metaclasses. """
        arg_2 = []  # [(scope_locals, consumed_key)]

        for arg_3 in arg_1.get_children():
            if isinstance(arg_3, astroid.ClassDef):
                arg_2.extend(arg_0._check_classdef_metaclasses(arg_3, arg_1))

        # Pop the consumed items, in order to avoid having
        # unused-import and unused-variable false positives
        for arg_4, arg_5 in arg_2:
            arg_4.pop(arg_5, None)


def Func(arg_0, arg_1):
    """return a list of subpackages for the given directory"""
    arg_2 = []
    for arg_3 in os.listdir(arg_0):
        arg_4 = join(arg_0, arg_3)
        if isdir(arg_4):
            if exists(join(arg_4, "__init__.py")):
                if arg_1:
                    arg_2.append("%s.%s" % (arg_1, arg_3))
                else:
                    arg_2.append(arg_3)
                arg_2 += Func(arg_4, arg_2[-1])
    return arg_2


def Func(arg_0, arg_1, arg_2):
    """make a layout with some stats about duplication"""
    arg_3 = ["", "now", "previous", "difference"]
    arg_3 += table_lines_from_stats(
        arg_1, arg_2, ("nb_duplicated_lines", "percent_duplicated_lines")
    )
    arg_0.append(Table(children=arg_3, cols=4, rheaders=1, cheaders=1))