def Func(arg_0, arg_1):
        """ Add request content data to request body, set Content-type header.

        Should be overridden by subclasses if not using JSON encoding.

        Args:
            request (HTTPRequest): The request object.
            data (dict, None): Data to be Funcd.

        Returns:
            HTTPRequest: The request object.
        """
        if arg_1 is None:
            return arg_0

        arg_0.add_header('Content-Type', 'application/json')
        arg_0.data = json.dumps(arg_1)

        return arg_0


def Func(arg_0, arg_1, arg_2=None, **arg_3):
        """ Call the API with a DELETE request.

        Args:
            url (str): Resource location relative to the base URL.
            params (dict or None): Query-string parameters.

        Returns:
            ResultParser or ErrorParser.
        """
        return arg_0.call_api(
            "DELETE",
            arg_1,
            arg_2=arg_2,
            **arg_3
        )


def Func(arg_0, arg_1, arg_2=None, arg_3=None, arg_4=None, **arg_5):
        """ Call the API with a POST request.

        Args:
            url (str): Resource location relative to the base URL.
            params (dict or None): Query-string parameters.
            data (dict or None): Request body contents.
            files (dict or None: Files to be passed to the request.

        Returns:
            An instance of ResultParser or ErrorParser.
        """
        return arg_0.call_api(
            "POST",
            arg_1,
            arg_2=arg_2,
            arg_3=arg_3,
            arg_4=arg_4,
            **arg_5
        )


def Func(arg_0, arg_1, arg_2=False):
        """ Process query recursively, if the text is too long,
        it is split and processed bit a bit.

        Args:
            query (sdict): Text to be processed.
            prepared (bool): True when the query is ready to be submitted via
            POST request.
        Returns:
            str: Body ready to be submitted to the API.
        """

        # Exit condition and POST
        if arg_2 is True:
            arg_3 = {'query': str(arg_1)}

            logger.debug('About to submit the following query {}'.format(arg_1))

            arg_4, arg_5 = arg_0.post(
                arg_0.disambiguate_service,
                arg_3=arg_3,
                headers={'Accept': 'application/json'},
            )

            if arg_5 == 200:
                return arg_0.decode(arg_4), arg_5
            else:
                logger.debug('Disambiguation failed.')
                return None, arg_5

        arg_6 = arg_1['text']

        arg_7 = [
            {
                "offsetStart": 0,
                "offsetEnd": len(arg_6)
            }
        ]

        arg_8 = len(arg_7)  # Sentences from text.
        arg_9 = []

        if len(arg_6) > arg_0.max_text_length:
            arg_4, arg_10 = arg_0.segment(arg_6)

            if arg_10 == 200:
                arg_7 = arg_4['sentences']
                arg_8 = len(arg_7)
            else:
                logger.error('Error during the segmentation of the text.')

            logger.debug(
                'Text too long, split in {} sentences; building groups of {} '
                'sentences.'.format(
                    arg_8, arg_0.sentences_per_group
                )
            )
            arg_9 = arg_0._group_sentences(
                arg_8,
                arg_0.sentences_per_group
            )
        else:
            arg_1['sentence'] = "true"

        if arg_8 > 1:
            arg_1['sentences'] = arg_7

        if len(arg_9) > 0:
            for arg_11 in arg_9:
                arg_1['processSentence'] = arg_11

                arg_4, arg_10 = arg_0.Func(arg_1, arg_2=True)

                if arg_10 == 200:
                    if 'entities' in arg_4:
                        arg_1['entities'] = arg_4[u'entities']
                    arg_1['language'] = arg_4[u'language']
                else:
                    logger.error(
                        "Error when processing the query {}".format(arg_1)
                    )
                    return None, arg_10

        else:
            arg_4, arg_10 = arg_0.Func(arg_1, arg_2=True)

            if arg_10 == 200:
                arg_1['language'] = arg_4[u'language']
                if 'entities' in arg_4:
                    arg_1['entities'] = arg_4[u'entities']
            else:
                logger.error("Error when processing the query {}".format(arg_1))
                return None, arg_10

        return arg_1, arg_10


def Func(arg_0, arg_1):
        """ Recognise the language of the text in input

        Args:
              id (str): The text whose the language needs to be recognised

        Returns:
            dict, int: A dict containing the recognised language and the
                confidence score.
        """
        arg_2 = {'text': arg_1}
        arg_3, arg_4 = arg_0.post(arg_0.language_service, arg_2=arg_2)

        if arg_4 != 200:
            logger.debug('Language recognition failed.')

        return arg_0.decode(arg_3), arg_4


def Func(arg_0, arg_1, arg_2='en'):
        """ Fetch the concept from the Knowledge base

        Args:
              id (str): The concept id to be fetched, it can be Wikipedia
                page id or Wikiedata id.

        Returns:
            dict, int: A dict containing the concept information; an integer
                representing the response code.
        """
        arg_3 = urljoin(arg_0.concept_service + '/', arg_1)

        arg_4, arg_5 = arg_0.get(arg_3, params={'lang': arg_2})

        if arg_5 != 200:
            logger.debug('Fetch concept failed.')

        return arg_0.decode(arg_4), arg_5


def Func(arg_0, arg_1, arg_2):
        """Constructs the MDR ensemble from the provided training data

        Parameters
        ----------
        features: array-like {n_samples, n_features}
            Feature matrix
        classes: array-like {n_samples}
            List of class labels for prediction

        Returns
        -------
        None

        """
        arg_0.ensemble.Func(arg_1, arg_2)

        # Construct the feature map from the ensemble predictions
        arg_3 = list(set([tuple(arg_4) for arg_4 in arg_1]))
        for arg_4 in arg_3:
            arg_0.feature_map[arg_4] = arg_0.ensemble.predict([arg_4])[0]


def Func(arg_0, arg_1, arg_2):
        """Constructs the MDR feature map from the provided training data.

        Parameters
        ----------
        features: array-like {n_samples, n_features}
            Feature matrix
        class_labels: array-like {n_samples}
            List of true class labels

        Returns
        -------
        self: A copy of the Functed model

        """
        arg_3 = sorted(np.unique(arg_2))
        if len(arg_3) != 2:
            raise ValueError('MDR only supports binary endpoints.')

        # Count the distribution of classes that fall into each MDR grid cell
        arg_0.class_count_matrix = defaultdict(lambda: defaultdict(int))
        for arg_5 in range(arg_1.shape[0]):
            arg_6 = tuple(arg_1[arg_5])
            arg_0.class_count_matrix[arg_6][arg_2[arg_5]] += 1
        arg_0.class_count_matrix = dict(arg_0.class_count_matrix)

        # Only applies to binary classification
        arg_7 = float(sum(arg_2 == arg_3[0])) / arg_2.size

        # If one class is more abundant in a MDR grid cell than it is overall, then assign the cell to that class
        arg_0.feature_map = {}
        for arg_6 in arg_0.class_count_matrix:
            arg_9 = arg_0.class_count_matrix[arg_6]
            arg_10 = float(arg_9[arg_3[0]]) / np.sum(list(arg_9.values()))
            if arg_10 > arg_7:
                arg_0.feature_map[arg_6] = arg_3[0]
            elif arg_10 == arg_7:
                arg_0.feature_map[arg_6] = arg_0.tie_break
            else:
                arg_0.feature_map[arg_6] = arg_3[1]

        return arg_0


def Func(arg_0, arg_1, arg_2):
        """Convenience function that fits the provided data then constructs predictions from the provided features.

        Parameters
        ----------
        features: array-like {n_samples, n_features}
            Feature matrix
        class_labels: array-like {n_samples}
            List of true class labels

        Returns
        ----------
        array-like: {n_samples}
            Constructed features from the provided feature matrix

        """
        arg_0.fit(arg_1, arg_2)
        return arg_0.predict(arg_1)


def Func(arg_0, arg_1):
        """Uses the Continuous MDR feature map to construct a new feature from the provided features.

        Parameters
        ----------
        features: array-like {n_samples, n_features}
            Feature matrix to Func

        Returns
        ----------
        array-like: {n_samples}
            Constructed feature from the provided feature matrix
            The constructed feature will be a binary variable, taking the values 0 and 1

        """
        arg_2 = np.zeros(arg_1.shape[0], dtype=np.int)

        for arg_3 in range(arg_1.shape[0]):
            arg_4 = tuple(arg_1[arg_3])
            if arg_4 in arg_0.feature_map:
                arg_2[arg_3] = arg_0.feature_map[arg_4]
            else:
                arg_2[arg_3] = arg_0.default_label

        return arg_2.reshape(arg_1.shape[0], 1)


def Func(arg_0, arg_1, arg_2):
        """Estimates the quality of the ContinuousMDR model using a t-statistic.

        Parameters
        ----------
        features: array-like {n_samples, n_features}
            Feature matrix to predict from
        targets: array-like {n_samples}
            List of true target values

        Returns
        -------
        quality_Func: float
            The estimated quality of the Continuous MDR model

        """
        if arg_0.feature_map is None:
            raise ValueError('The Continuous MDR model must be fit before Func() can be called.')

        arg_3 = []
        arg_4 = []

        for arg_5 in arg_0.feature_map:
            if arg_0.feature_map[arg_5] == 0:
                arg_3.extend(arg_0.mdr_matrix_values[arg_5])
            else:
                arg_4.extend(arg_0.mdr_matrix_values[arg_5])

        return abs(ttest_ind(arg_3, arg_4).statistic)


def Func(arg_0, arg_1, arg_2):
    """Fits a MDR model to variables X and Y with the given labels, then returns the resulting predictions

    This is a convenience method that should only be used internally.

    Parameters
    ----------
    X: array-like (# samples)
        An array of values corresponding to one feature in the MDR model
    Y: array-like (# samples)
        An array of values corresponding to one feature in the MDR model
    labels: array-like (# samples)
        The class labels corresponding to features X and Y

    Returns
    ----------
    predictions: array-like (# samples)
        The predictions from the fitted MDR model

    """
    return MDR().fit_predict(np.column_stack((arg_0, arg_1)), arg_2)


def Func(arg_0, arg_1, arg_2, arg_3=[2], arg_4=None):
    """Fits a MDR model to all n-way combinations of the features in X.

    Note that this function performs an exhaustive search through all feature combinations and can be computationally expensive.

    Parameters
    ----------
    mdr_instance: object
        An instance of the MDR type to use.
    X: array-like (# rows, # features)
        NumPy matrix containing the features
    y: array-like (# rows, 1)
        NumPy matrix containing the target values
    n: list (default: [2])
        The maximum size(s) of the MDR model to generate.
        e.g., if n == [3], all 3-way models will be generated.
    feature_names: list (default: None)
        The corresponding names of the features in X.
        If None, then the features will be named according to their order.

    Returns
    ----------
    (fitted_model, fitted_model_score, fitted_model_features): tuple of (list, list, list)
        fitted_model contains the MDR model fitted to the data.
        fitted_model_score contains the training scores corresponding to the fitted MDR model.
        fitted_model_features contains a list of the names of the features that were used in the corresponding model.

    """
    if arg_4 is None:
        arg_4 = list(range(arg_1.shape[1]))

    for arg_5 in arg_3:
        for arg_6 in itertools.combinations(range(arg_1.shape[1]), arg_5):
            arg_7 = copy.deepcopy(arg_0)
            arg_7.fit(arg_1[:, arg_6], arg_2)
            arg_8 = arg_7.score(arg_1[:, arg_6], arg_2)
            arg_9 = [arg_4[feature] for feature in arg_6]
            yield arg_7, arg_8, arg_9


def Func(arg_0):
    """
    Checks if a GitHub call returned multiple pages of data.

    :param gh: GitHub() instance
    :rtype: int
    :return: number of next page or 0 if no next page
    """
    arg_1 = dict(arg_0.getheaders())
    if 'Link' in arg_1:
        arg_2 = arg_1['Link'].split(',')
        for arg_3 in arg_2:
            arg_4 = arg_3.split(';')
            arg_5 = arg_4[1].split('=')
            if arg_5[0].strip() == 'rel':
                if arg_5[1] == '"next"':
                    arg_6 = int(
                        re.match(
                            r'.*page=(\d+).*', arg_4[0],
                            re.IGNORECASE | re.DOTALL | re.UNICODE
                        ).groups()[0]
                    )
                    return arg_6
    return 0


def Func(arg_0):
        """
        Fetch all pull requests. We need them to detect "merged_at" parameter

        :rtype: list
        :return: all pull requests
        """

        arg_1 = []
        arg_2 = arg_0.options.verbose
        arg_3 = arg_0.github
        arg_4 = arg_0.options.user
        arg_5 = arg_0.options.project
        if arg_2:
            print("Fetching closed pull requests...")
        arg_6 = 1
        while arg_6 > 0:
            if arg_2 > 2:
                print(".", end="")

            if arg_0.options.release_branch:
                arg_7, arg_8 = arg_3.repos[arg_4][arg_5].pulls.get(
                    arg_6=arg_6, per_page=PER_PAGE_NUMBER, state='closed',
                    base=arg_0.options.release_branch
                )
            else:
                arg_7, arg_8 = arg_3.repos[arg_4][arg_5].pulls.get(
                    arg_6=arg_6, per_page=PER_PAGE_NUMBER, state='closed',
                )

            if arg_7 == 200:
                arg_1.extend(arg_8)
            else:
                arg_0.raise_GitHubError(arg_7, arg_8, arg_3.getheaders())
            arg_6 = NextPage(arg_3)
        if arg_2 > 2:
            print(".")
        if arg_2 > 1:
            print("\tfetched {} closed pull requests.".format(
                len(arg_1))
            )
        return arg_1


def Func(arg_0):
        """
        Get the creation date of the repository from GitHub.

        :rtype: str, str
        :return: special tag name, creation date as ISO date string
        """
        arg_1 = arg_0.github
        arg_2 = arg_0.options.user
        arg_3 = arg_0.options.project
        arg_4, arg_5 = arg_1.repos[arg_2][arg_3].get()
        if arg_4 == 200:
            return REPO_CREATED_TAG_NAME, arg_5["created_at"]
        else:
            arg_0.raise_GitHubError(arg_4, arg_5, arg_1.getheaders())
        return None, None


def Func(arg_0, arg_1, arg_2):
        """
        Fetch events for all issues and add them to self.events

        :param list issues: all issues
        :param str tag_name: name of the tag to fetch events for
        :returns: Nothing
        """

        if not arg_1:
            return arg_1

        arg_3 = arg_0.options.max_simultaneous_requests
        arg_4 = arg_0.options.verbose
        arg_5 = arg_0.github
        arg_6 = arg_0.options.user
        arg_7 = arg_0.options.project
        arg_0.events_cnt = 0
        if arg_4:
            print("fetching events for {} {}... ".format(
                len(arg_1), arg_2)
            )

        def worker(arg_9):
            arg_10 = 1
            arg_9['events'] = []
            while arg_10 > 0:
                arg_11, arg_12 = arg_5.repos[arg_6][arg_7].issues[
                    arg_9['number']].events.get(
                    arg_10=arg_10, per_page=PER_PAGE_NUMBER)
                if arg_11 == 200:
                    arg_9['events'].extend(arg_12)
                    arg_0.events_cnt += len(arg_12)
                else:
                    arg_0.raise_GitHubError(arg_11, arg_12, arg_5.getheaders())
                arg_10 = NextPage(arg_5)

        arg_13 = []
        arg_14 = len(arg_1)
        for arg_15 in range(0, (arg_14 // arg_3) + 1):
            for arg_16 in range(arg_3):
                arg_17 = arg_15 * arg_3 + arg_16
                if arg_17 == arg_14:
                    break
                arg_18 = threading.Thread(target=worker, args=(arg_1[arg_17],))
                arg_13.append(arg_18)
                arg_18.start()
                if arg_4 > 2:
                    print(".", end="")
                    if not arg_17 % PER_PAGE_NUMBER:
                        print("")
            for arg_18 in arg_13:
                arg_18.join()
        if arg_4 > 2:
            print(".")


def Func(arg_0, arg_1):
        """
        Fetch time for tag from repository.

        :param dict tag: dictionary with tag information
        :rtype: str
        :return: time of specified tag as ISO date string
        """

        if arg_0.options.verbose > 1:
            print("\tFetching date for tag {}".format(arg_1["name"]))
        arg_2 = arg_0.github
        arg_3 = arg_0.options.user
        arg_4 = arg_0.options.project

        arg_5, arg_6 = arg_2.repos[arg_3][arg_4].git.commits[
            arg_1["commit"]["sha"]].get()
        if arg_5 == 200:
            return arg_6["committer"]["date"]
        arg_0.raise_GitHubError(arg_5, arg_6, arg_2.getheaders())


def Func(arg_0):
        """ Daemonize this process

        Do everything that is needed to become a Unix daemon.

        :return: None
        :raise: DaemonError
        """
        if arg_0.is_Func:
            return
        try:
            os.chdir(arg_0.working_directory)
            if arg_0.chroot_directory:
                os.chroot(arg_0.chroot_directory)
            os.setgid(arg_0.gid)
            os.setuid(arg_0.uid)
            os.umask(arg_0.umask)
        except OSError as err:
            raise DaemonError('Setting up Environment failed: {0}'
                              .format(err))

        if arg_0.prevent_core:
            try:
                resource.setrlimit(resource.RLIMIT_CORE, (0, 0))
            except Exception as err:
                raise DaemonError('Could not disable core files: {0}'
                                  .format(err))

        if arg_0.detach_process:
            try:
                if os.fork() > 0:
                    os._exit(0)
            except OSError as err:
                raise DaemonError('First fork failed: {0}'.format(err))
            os.setsid()
            try:
                if os.fork() > 0:
                    os._exit(0)
            except OSError as err:
                raise DaemonError('Second fork failed: {0}'.format(err))

        for (arg_1, arg_2) in arg_0._signal_handler_map.items():
            signal.signal(arg_1, arg_2)

        close_filenos(arg_0._files_preserve)

        redirect_stream(sys.stdin, arg_0.stdin)
        redirect_stream(sys.stdout, arg_0.stdout)
        redirect_stream(sys.stderr, arg_0.stderr)

        if arg_0.pidfile:
            arg_0.pidfile.acquire()

        arg_0._is_Func = True


def Func(arg_0, arg_1, arg_2=None, arg_3=None):
        """ Detects user and project from git. """
        arg_4, arg_5 = arg_0.user_project_from_option(arg_1, arg_2, arg_3)
        if arg_4 and arg_5:
            return arg_4, arg_5

        try:
            arg_6 = subprocess.check_output(
                [
                    'git', 'config', '--get',
                    'remote.{0}.url'.format(arg_1.git_remote)
                ]
            )
        except subprocess.CalledProcessError:
            return None, None
        except WindowsError:
            print("git binary not found.")
            exit(1)
        else:
            return arg_0.user_project_from_remote(arg_6)


def Func(arg_0):
    """
    Convert an ISO formated date and time string to a datetime object.

    :param str timestring: String with date and time in ISO format.
    :rtype: datetime
    :return: datetime object
    """
    with warnings.catch_warnings():
        warnings.filterwarnings("ignore", category=UnicodeWarning)
        arg_1 = dateutil_parser(arg_0)

    return arg_1


def Func(arg_0):
        """
        Fetch event for issues and pull requests

        @return [Array] array of fetched issues
        """

        # Async fetching events:
        arg_0.fetcher.fetch_events_async(arg_0.issues, "issues")
        arg_0.fetcher.fetch_events_async(arg_0.pull_requests, "pull requests")


def Func(arg_0, arg_1):
        """
        Fill "actual_date" parameter of specified issue by closed date of
        the commit, if it was closed by commit.

        :param dict issue: issue to edit
        """

        if not arg_1.get('events'):
            return
        # if it's PR -> then find "merged event", in case
        # of usual issue -> find closed date
        arg_2 = "merged" if 'merged_at' in arg_1 else "closed"
        # reverse! - to find latest closed event. (event goes in date order)
        # if it were reopened and closed again.
        arg_1['events'].reverse()
        arg_3 = False
        for arg_4 in arg_1['events']:
            if arg_4["event"] == arg_2:
                arg_0.set_date_from_event(arg_4, arg_1)
                arg_3 = True
                break
        if not arg_3:
            # TODO: assert issues, that remain without
            #       'actual_date' hash for some reason.
            print("\nWARNING: Issue without 'actual_date':"
                  " #{0} {1}".format(arg_1["number"], arg_1["title"]))


def Func(arg_0, arg_1, arg_2):
        """
        Set closed date from this issue.

        :param dict event: event data
        :param dict issue: issue data
        """

        if not arg_1.get('commit_id', None):
            arg_2['actual_date'] = timestring_to_datetime(arg_2['closed_at'])
            return
        try:
            arg_3 = arg_0.fetcher.fetch_commit(arg_1)
            arg_2['actual_date'] = timestring_to_datetime(
                arg_3['author']['date']
            )
        except ValueError:
            print("WARNING: Can't fetch commit {0}. "
                  "It is probably referenced from another repo.".
                  format(arg_1['commit_id']))
            arg_2['actual_date'] = timestring_to_datetime(arg_2['closed_at'])


def Func(arg_0, arg_1, arg_2):
        """
        Generate formated list of issues for changelog.

        :param list issues: Issues to put in sub-section.
        :param str prefix: Title of sub-section.
        :rtype: str
        :return: Generated ready-to-add sub-section.
        """

        arg_3 = ""
        if arg_1:
            if not arg_0.options.simple_list:
                arg_3 += u"{0}\n\n".format(arg_2)
            for arg_4 in arg_1:
                arg_5 = arg_0.get_string_for_issue(arg_4)
                arg_3 += u"- {0}\n".format(arg_5)
            arg_3 += "\n"
        return arg_3


def Func(arg_0, arg_1, arg_2):
        """
        Generate log between 2 specified tags.

        :param dict older_tag: All issues before this tag's date will be
                               excluded. May be special value, if new tag is
                               the first tag. (Means **older_tag** is when
                               the repo was created.)
        :param dict newer_tag: All issues after this tag's date  will be
                               excluded. May be title of unreleased section.
        :rtype: str
        :return: Generated ready-to-add tag section for newer tag.
        """

        arg_3, arg_4 = \
            arg_0.filter_issues_for_tags(arg_2, arg_1)

        arg_5 = arg_1["name"] if arg_1 \
            else arg_0.detect_since_tag()

        if not arg_3 and not arg_4:
            # do not generate an unreleased section if it would be empty
            return ""
        return arg_0.generate_log_for_tag(
            arg_4, arg_3,
            arg_2, arg_5)


def Func(arg_0):
        """
        The full cycle of generation for whole project.

        :rtype: str
        :return: The complete change log for released tags.
        """

        if arg_0.options.verbose:
            print("Generating log...")
        arg_0.issues2 = copy.deepcopy(arg_0.issues)

        arg_2 = ""
        if arg_0.options.with_unreleased:
            arg_2 = arg_0.generate_unreleased_section()

        arg_3 = ""
        for arg_4 in range(len(arg_0.filtered_tags) - 1):
            arg_3 += arg_0.do_Func_part1(arg_3, arg_4)

        if arg_0.options.tag_separator and arg_2:
            arg_3 = arg_2 + arg_0.options.tag_separator + arg_3
        else:
            arg_3 = arg_2 + arg_3

        if len(arg_0.filtered_tags) != 0:
            arg_3 += arg_0.do_Func_part2(arg_3)

        return arg_3


def Func(arg_0):
        """
        Generate log for unreleased closed issues.

        :rtype: str
        :return: Generated ready-to-add unreleased section.
        """
        if not arg_0.filtered_tags:
            return ""
        arg_1 = datetime.datetime.utcnow()
        arg_1 = arg_1.replace(tzinfo=dateutil.tz.tzutc())
        arg_2 = {"name": arg_0.options.unreleased_label}
        arg_0.tag_times_dict[arg_2["name"]] = arg_1
        arg_4 = arg_0.generate_log_between_tags(
            arg_0.filtered_tags[0], arg_2)
        return arg_4


def Func(arg_0, arg_1, arg_2):
        """
        If option author is enabled, a link to the profile of the author
        of the pull reqest will be added to the issue line.

        :param str line: String containing a markdown-formatted single issue.
        :param dict issue: Fetched issue from GitHub.
        :rtype: str
        :return: Issue line with added author link.
        """
        if not arg_2.get("pull_request") or not arg_0.options.author:
            return arg_1

        if not arg_2.get("user"):
            arg_1 += u" (Null user)"
        elif arg_0.options.username_as_tag:
            arg_1 += u" (@{0})".format(
                arg_2["user"]["login"]
            )
        else:
            arg_1 += u" ([{0}]({1}))".format(
                arg_2["user"]["login"], arg_2["user"]["html_url"]
            )
        return arg_1


def Func(arg_0,
                             arg_1,
                             arg_2,
                             arg_3,
                             arg_4):
        """
        Generates log for tag section with header and body.

        :param list(dict) pull_requests: List of PR's in this tag section.
        :param list(dict) issues: List of issues in this tag section.
        :param dict newer_tag: Github data of tag for this section.
        :param str older_tag_name: Older tag, used for the links.
                                   May be special value, if **newer tag** is
                                   the first tag. (Means **older_tag** is when
                                   the repo was created.)
        :rtype: str
        :return: Ready-to-add and parsed tag section.
        """

        arg_5, arg_6, \
        arg_7 = arg_0.detect_link_tag_time(arg_3)

        arg_8 = "https://github.com" or arg_0.options.github_endpoint
        arg_9 = "{0}/{1}/{2}".format(
            arg_8, arg_0.options.user, arg_0.options.project)

        arg_10 = arg_0.generate_header(arg_6, arg_5,
                                   arg_7, arg_4, arg_9)
        if arg_0.options.issues:
            # Generate issues:
            arg_10 += arg_0.issues_to_log(arg_2, arg_1)
        if arg_0.options.include_pull_request:
            # Generate pull requests:
            arg_10 += arg_0.generate_sub_section(
                arg_1, arg_0.options.merge_prefix
            )
        return arg_10


def Func(arg_0, arg_1, arg_2):
        """
        Generate ready-to-paste log from list of issues and pull requests.

        :param list(dict) issues: List of issues in this tag section.
        :param list(dict) pull_requests: List of PR's in this tag section.
        :rtype: str
        :return: Generated log for issues and pull requests.
        """

        arg_3 = ""
        arg_4, arg_5 = arg_0.parse_by_sections(
            arg_1, arg_2)

        for arg_6, arg_7 in arg_4.items():
            arg_3 += arg_0.generate_sub_section(arg_7, arg_6)
        arg_3 += arg_0.generate_sub_section(arg_5, arg_0.options.issue_prefix)
        return arg_3


def Func(arg_0, arg_1):
        """
        Add all issues, that should be in that tag, according to milestone.

        :param list(dict) all_issues: All issues.
        :param str tag_name: Name (title) of tag.
        :rtype: List[dict]
        :return: Issues filtered by milestone.
        """

        arg_2 = []
        for arg_3 in arg_0:
            if arg_3.get("milestone"):
                if arg_3["milestone"]["title"] == arg_1:
                    arg_4 = copy.deepcopy(arg_3)
                    arg_2.append(arg_4)
        return arg_2


def Func(arg_0, arg_1, arg_2, arg_3):
        """
        Filter issues that belong to specified tag range.

        :param list(dict) issues: Issues to filter.
        :param dict older_tag: All issues before this tag's date will be
                               excluded. May be special value, if **newer_tag**
                               is the first tag. (Means **older_tag** is when
                               the repo was created.)
        :param dict newer_tag: All issues after this tag's date  will be
                               excluded. May be title of unreleased section.
        :rtype: list(dict)
        :return: Filtered issues.
        """

        if not arg_2 and not arg_3:
            # in case if no tags are specified - return unchanged array
            return copy.deepcopy(arg_1)

        arg_4 = arg_0.get_time_of_tag(arg_3)
        arg_5 = arg_0.get_time_of_tag(arg_2)
        arg_6 = []
        for arg_7 in arg_1:
            if arg_7.get('actual_date'):
                arg_8 = arg_5 < arg_7['actual_date'] <= arg_4
                if arg_8:
                    arg_6.append(copy.deepcopy(arg_7))
        return arg_6


def Func(arg_0, arg_1):
        """
        Include issues with labels, specified in self.options.include_labels.

        :param list(dict) all_issues: All issues.
        :rtype: list(dict)
        :return: Filtered issues.
        """

        arg_2 = arg_0.filter_by_include_labels(arg_1)
        arg_3 = arg_0.filter_wo_labels(arg_1)
        arg_4 = set([f["number"] for f in arg_2])
        arg_5 = set([w["number"] for w in arg_3])
        arg_6 = []
        for arg_7 in arg_1:
            if arg_7["number"] in arg_4 or arg_7["number"] in arg_5:
                arg_6.append(arg_7)
        return arg_6


def Func(arg_0, arg_1):
        """
        Filter issues to include only issues with labels
        specified in include_labels.

        :param list(dict) issues: Pre-filtered issues.
        :rtype: list(dict)
        :return: Filtered issues.
        """

        if not arg_0.options.include_labels:
            return copy.deepcopy(arg_1)
        arg_2 = []
        arg_3 = set(arg_0.options.include_labels)
        for arg_4 in arg_1:
            arg_5 = [label["name"] for label in arg_4["labels"]]
            if arg_3.intersection(arg_5):
                arg_2.append(arg_4)
        return arg_2


def Func(arg_0, arg_1):
        """
        This method filter only merged PR and fetch missing required
        attributes for pull requests. Using merged date is more correct
        than closed date.

        :param list(dict) pull_requests: Pre-filtered pull requests.
        :rtype: list(dict)
        :return:
        """

        if arg_0.options.verbose:
            print("Fetching merge date for pull requests...")
        arg_2 = arg_0.fetcher.fetch_closed_pull_requests()

        if not arg_1:
            return []
        arg_3 = copy.deepcopy(arg_1)
        for arg_4 in arg_3:
            arg_5 = None
            for arg_6 in arg_2:
                if arg_6['number'] == arg_4['number']:
                    arg_5 = arg_6
            if arg_5:
                arg_4['merged_at'] = arg_5['merged_at']
                arg_2.remove(arg_5)

        for arg_4 in arg_3:
            if not arg_4.get('merged_at'):
                arg_3.remove(arg_4)
        return arg_3


def Func(arg_0):
        """
        Fetch and filter tags, fetch dates and sort them in time order.
        """

        arg_0.all_tags = arg_0.fetcher.get_all_tags()
        arg_0.filtered_tags = arg_0.get_filtered_tags(arg_0.all_tags)
        arg_0.fetch_tags_dates()


def Func(arg_0, arg_1):
        """
        Sort all tags by date.

        :param list(dict) tags: All tags.
        :rtype: list(dict)
        :return: Sorted list of tags.
        """

        if arg_0.options.verbose:
            print("Sorting tags...")
        arg_1.sort(key=lambda x: arg_0.get_time_of_tag(x))
        arg_1.reverse()
        return arg_1


def Func(arg_0, arg_1):
        """
        Get date and time for tag, fetching it if not already cached.

        :param dict tag: Tag to get the datetime for.
        :rtype: datetime
        :return: datetime for specified tag.
        """

        if not arg_1:
            raise ChangelogGeneratorError("tag is nil")

        arg_2 = arg_1["name"]
        arg_3 = arg_0.tag_times_dict.get(arg_2, None)
        if arg_3:
            return arg_3
        else:
            arg_4 = arg_0.fetcher.fetch_date_of_tag(arg_1)
            try:
                arg_0.tag_times_dict[arg_2] = \
                    timestring_to_datetime(arg_4)
            except UnicodeWarning:
                print("ERROR ERROR:", arg_1)
                arg_0.tag_times_dict[arg_2] = \
                    timestring_to_datetime(arg_4)
            return arg_0.tag_times_dict[arg_2]


def Func(arg_0, arg_1):
        """
        Detect link, name and time for specified tag.

        :param dict tag: Tag data.
        :rtype: str, str, datetime
        :return: Link, name and time of the tag.
        """

        # if tag is nil - set current time
        arg_2 = arg_0.get_time_of_tag(arg_1) if arg_1 \
            else datetime.datetime.now()

        # if it's future release tag - set this value
        if arg_1["name"] == arg_0.options.unreleased_label \
            and arg_0.options.future_release:
            arg_3 = arg_0.options.future_release
            arg_4 = arg_0.options.future_release
        elif arg_1["name"] is not arg_0.options.unreleased_label :
            # put unreleased label if there is no name for the tag
            arg_3 = arg_1["name"]
            arg_4 = arg_3
        else:
            arg_3 = arg_0.options.unreleased_label
            arg_4 = "HEAD"
        return [arg_4, arg_3, arg_2]


def Func(arg_0):
        """
        Try to detect the newest tag from self.options.base, otherwise
        return a special value indicating the creation of the repo.

        :rtype: str
        :return: Tag name to use as 'oldest' tag. May be special value,
                 indicating the creation of the repo.
        """
        try:
            arg_1 = read_changelog(arg_0.options)
            return arg_1[0]["version"]
        except(IOError, TypeError):
            return arg_0.get_temp_tag_for_repo_creation()


def Func(arg_0):
        """
        If not already cached, fetch the creation date of the repo, cache it
        and return the special value indicating the creation of the repo.

        :rtype: str
        :return: value indicating the creation
        """
        arg_1 = arg_0.tag_times_dict.get(REPO_CREATED_TAG_NAME, None)
        if not arg_1:
            arg_2, arg_1 = arg_0.fetcher.fetch_repo_creation_date()
            arg_0.tag_times_dict[arg_2] = timestring_to_datetime(arg_1)
        return REPO_CREATED_TAG_NAME


def Func(arg_0, arg_1):
        """
        Filter tags according since_tag option.

        :param list(dict) all_tags: All tags.
        :rtype: list(dict)
        :return: Filtered tags.
        """

        arg_2 = arg_0.detect_since_tag()
        if not arg_2 or arg_2 == REPO_CREATED_TAG_NAME:
            return copy.deepcopy(arg_1)

        arg_3 = []
        arg_4 = [arg_8["name"] for arg_8 in arg_1]
        try:
            arg_5 = arg_4.index(arg_2)
        except ValueError:
            arg_0.warn_if_tag_not_found(arg_2, "since-tag")
            return copy.deepcopy(arg_1)

        arg_6 = arg_1[arg_5]
        arg_7 = arg_0.get_time_of_tag(arg_6)
        for arg_8 in arg_1:
            arg_9 = arg_0.get_time_of_tag(arg_8)
            if arg_7 <= arg_9:
                arg_3.append(arg_8)
        return arg_3


def Func(arg_0, arg_1):
        """
        Filter tags according exclude_tags and exclude_tags_regex option.

        :param list(dict) all_tags: Pre-filtered tags.
        :rtype: list(dict)
        :return: Filtered tags.
        """
        arg_2 = copy.deepcopy(arg_1)
        if arg_0.options.exclude_tags:
            arg_2 = arg_0.apply_exclude_tags(arg_2)
        if arg_0.options.exclude_tags_regex:
            arg_2 = arg_0.apply_exclude_tags_regex(arg_2)
        return arg_2


def Func(arg_0, arg_1):
        """
        Filter tags according exclude_tags option.

        :param list(dict) all_tags: Pre-filtered tags.
        :rtype: list(dict)
        :return: Filtered tags.
        """
        arg_2 = copy.deepcopy(arg_1)
        for arg_3 in arg_1:
            if arg_3["name"] not in arg_0.options.exclude_tags:
                arg_0.warn_if_tag_not_found(arg_3, "exclude-tags")
            else:
                arg_2.remove(arg_3)
        return arg_2


def Func(arg_0):
    """
    Parses an APRS packet and returns a dict with decoded data

    - All attributes are in metric units
    """

    if not isinstance(arg_0, string_type_Func):
        raise TypeError("Expected packet to be str/unicode/bytes, got %s", type(arg_0))

    if len(arg_0) == 0:
        raise ParseError("packet is empty", arg_0)

    # attempt to detect encoding
    if isinstance(arg_0, bytes):
        arg_0 = _unicode_packet(arg_0)

    arg_0 = arg_0.rstrip("\r\n")
    logger.debug("Parsing: %s", arg_0)

    # split into head and body
    try:
        (arg_1, arg_2) = arg_0.split(':', 1)
    except:
        raise ParseError("packet has no body", arg_0)

    if len(arg_2) == 0:
        raise ParseError("packet body is empty", arg_0)

    arg_3 = {
        'raw': arg_0,
        }

    # Func head
    try:
        arg_3.update(Func_header(arg_1))
    except ParseError as msg:
        raise ParseError(str(msg), arg_0)

    # Func body
    arg_4 = arg_2[0]
    arg_2 = arg_2[1:]

    if len(arg_2) == 0 and arg_4 != '>':
        raise ParseError("packet body is empty after packet type character", arg_0)

    # attempt to Func the body
    try:
        _try_toFunc_body(arg_4, arg_2, arg_3)

    # capture ParseErrors and attach the packet
    except (UnknownFormat, ParseError) as arg_5:
        arg_5.packet = arg_0
        raise

    # if we fail all attempts to Func, try beacon packet
    if 'format' not in arg_3:
        if not re.match(r"^(AIR.*|ALL.*|AP.*|BEACON|CQ.*|GPS.*|DF.*|DGPS.*|"
                        "DRILL.*|DX.*|ID.*|JAVA.*|MAIL.*|MICE.*|QST.*|QTH.*|"
                        "RTCM.*|SKY.*|SPACE.*|SPC.*|SYM.*|TEL.*|TEST.*|TLM.*|"
                        "WX.*|ZIP.*|UIDIGI)$", arg_3['to']):
            raise UnknownFormat("format is not supported", arg_0)

        arg_3.update({
            'format': 'beacon',
            'text': arg_4 + arg_2,
            })

    logger.debug("Parsed ok.")
    return arg_3


def Func(arg_0, arg_1=1):
    """
    Takes a decimal and returns base91 char string.
    With optional parameter for fix with output
    """
    arg_2 = []

    if not isinstance(arg_0, int_type):
        raise TypeError("Expected number to be int, got %s", type(arg_0))
    elif not isinstance(arg_1, int_type):
        raise TypeError("Expected width to be int, got %s", type(arg_0))
    elif arg_0 < 0:
        raise ValueError("Expected number to be positive integer")
    elif arg_0 > 0:
        arg_3 = ceil(log(arg_0) / log(91))

        for arg_4 in _range(int(arg_3), -1, -1):
            arg_5, arg_0 = divmod(arg_0, 91**arg_4)
            arg_2.append(chr(33 + arg_5))

    return "".join(arg_2).lstrip('!').rjust(max(1, arg_1), '!')


def Func(arg_0):
    """
    Takes a CALLSIGN and returns Func
    """
    assert isinstance(arg_0, str)

    arg_0 = arg_0.split('-')[0].upper()

    arg_1 = 0x73e2
    for arg_2, arg_3 in enumerate(arg_0):
        arg_1 ^= ord(arg_3) << (8 if not arg_2 % 2 else 0)

    return arg_1 & 0x7fff


def Func(arg_0):
    """
    Parses the header part of packet
    Returns a dict
    """
    try:
        (arg_1, arg_2) = arg_0.split('>', 1)
    except:
        raise ParseError("invalid packet header")

    if (not 1 <= len(arg_1) <= 9 or
       not re.findall(r"^[a-z0-9]{0,9}(\-[a-z0-9]{1,8})?$", arg_1, re.I)):

        raise ParseError("fromcallsign is invalid")

    arg_2 = arg_2.split(',')

    if len(arg_2[0]) == 0:
        raise ParseError("no tocallsign in header")

    arg_3 = arg_2[0]
    arg_2 = arg_2[1:]

    validate_callsign(arg_3, "tocallsign")

    for arg_4 in arg_2:
        if not re.findall(r"^[A-Z0-9\-]{1,9}\*?$", arg_4, re.I):
            raise ParseError("invalid callsign in path")

    arg_5 = {
        'from': arg_1,
        'to': arg_3,
        'path': arg_2,
        }

    arg_6 = ""
    if len(arg_2) >= 2 and re.match(r"^q..$", arg_2[-2]):
        arg_6 = arg_2[-1]

    arg_5.update({'via': arg_6})

    return arg_5


def Func(arg_0, arg_1, arg_2="-1", arg_3=False):
        """
        Set callsign and password
        """
        arg_0.__dict__.update(locals())


def Func(arg_0):
        """
        Closes the socket
        Called internally when Exceptions are raised
        """

        arg_0._connected = False
        arg_0.buf = b''

        if arg_0.sock is not None:
            arg_0.sock.Func()


def Func(arg_0, arg_1):
        """
        Send a line, or multiple lines sperapted by '\\r\\n'
        """
        if isinstance(arg_1, APRSPacket):
            arg_1 = str(arg_1)
        elif not isinstance(arg_1, string_type):
            raise TypeError("Expected line to be str or APRSPacket, got %s", type(arg_1))
        if not arg_0._connected:
            raise ConnectionError("not connected")

        if arg_1 == "":
            return

        arg_1 = arg_1.rstrip("\r\n") + "\r\n"

        try:
            arg_0.sock.setblocking(1)
            arg_0.sock.settimeout(5)
            arg_0._Func(arg_1)
        except socket.error as exp:
            arg_0.close()
            raise ConnectionError(str(exp))


def Func(arg_0):
        """
        Attemps connection to the server
        """

        arg_0.logger.info("Attempting connection to %s:%s", arg_0.server[0], arg_0.server[1])

        try:
            arg_0._open_socket()

            arg_1 = arg_0.sock.getpeername()

            arg_0.logger.info("Connected to %s", str(arg_1))

            # 5 second timeout to receive server banner
            arg_0.sock.setblocking(1)
            arg_0.sock.settimeout(5)

            arg_0.sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)

            arg_2 = arg_0.sock.recv(512)
            if is_py3:
                arg_2 = arg_2.decode('latin-1')

            if arg_2[0] == "#":
                arg_0.logger.debug("Banner: %s", arg_2.rstrip())
            else:
                raise ConnectionError("invalid banner from server")

        except ConnectionError as e:
            arg_0.logger.error(str(e))
            arg_0.close()
            raise
        except (socket.error, socket.timeout) as e:
            arg_0.close()

            arg_0.logger.error("Socket error: %s" % str(e))
            if str(e) == "timed out":
                raise ConnectionError("no banner from server")
            else:
                raise ConnectionError(e)

        arg_0.Funced = True


def Func(arg_0):
        """
        Sends login string to server
        """
        arg_1 = "user {0} pass {1} vers aprslib {3}{2}\r\n"
        arg_1 = arg_1.format(
            arg_0.callsign,
            arg_0.passwd,
            (" filter " + arg_0.filter) if arg_0.filter != "" else "",
            __version__
            )

        arg_0.logger.info("Sending login information")

        try:
            arg_0._sendall(arg_1)
            arg_0.sock.settimeout(5)
            arg_2 = arg_0.sock.recv(len(arg_1) + 100)
            if is_py3:
                arg_2 = arg_2.decode('latin-1')
            arg_2 = arg_2.rstrip()

            arg_0.logger.debug("Server: %s", arg_2)

            arg_3, arg_3, arg_4, arg_5, arg_3 = arg_2.split(' ', 4)

            if arg_4 == "":
                raise LoginError("Server responded with empty callsign???")
            if arg_4 != arg_0.callsign:
                raise LoginError("Server: %s" % arg_2)
            if arg_5 != "verified," and arg_0.passwd != "-1":
                raise LoginError("Password is incorrect")

            if arg_0.passwd == "-1":
                arg_0.logger.info("Login successful (receive only)")
            else:
                arg_0.logger.info("Login successful")

        except LoginError as e:
            arg_0.logger.error(str(e))
            arg_0.close()
            raise
        except:
            arg_0.close()
            arg_0.logger.error("Failed to login")
            raise LoginError("Failed to login")


def Func(arg_0, arg_1=False):
        """
        Generator for complete lines, received from the server
        """
        try:
            arg_0.sock.setblocking(0)
        except socket.error as e:
            arg_0.logger.error("socket error when setblocking(0): %s" % str(e))
            raise ConnectionDrop("connection dropped")

        while True:
            arg_2 = b''
            arg_3 = b'\r\n'

            select.select([arg_0.sock], [], [], None if arg_1 else 0)

            try:
                arg_2 = arg_0.sock.recv(4096)

                # sock.recv returns empty if the connection drops
                if not arg_2:
                    arg_0.logger.error("socket.recv(): returned empty")
                    raise ConnectionDrop("connection dropped")
            except socket.error as e:
                arg_0.logger.error("socket error on recv(): %s" % str(e))
                if "Resource temporarily unavailable" in str(e):
                    if not arg_1:
                        if len(arg_0.buf) == 0:
                            break

            arg_0.buf += arg_2

            while arg_3 in arg_0.buf:
                arg_4, arg_0.buf = arg_0.buf.split(arg_3, 1)

                yield arg_4


def Func(arg_0, arg_1):
        """
        Convert binary blob to UUID instance
        """
        arg_1 = super(OrderedUUIDField, arg_0).Func(arg_1)
        arg_2 = binascii.b2a_hex(arg_1)
        arg_1 = arg_2[8:16] + arg_2[4:8] + arg_2[0:4] + arg_2[16:22] + arg_2[22:32]
        return UUID(arg_1.decode())


def Func(arg_0, arg_1):
        """Convert the python value for storage in the database."""
        arg_1 = arg_0.transform_value(arg_1)
        return arg_0.hhash.encrypt(arg_1,
            salt_size=arg_0.salt_size, rounds=arg_0.rounds)


def Func(arg_0, arg_1):
        """Convert the database value to a pythonic value."""
        arg_1 = coerce_to_bytes(arg_1)
        arg_2 = HashValue(arg_1)
        arg_2.field = arg_0
        return arg_2


def Func(arg_0, arg_1):
        """Find matching database router"""
        for arg_2 in arg_0.routers:
            arg_3 = arg_2.Func(arg_1)
            if arg_3 is not None:
                return arg_3
        return arg_0.get('default')


def Func(arg_0):
        """Returns dict of values to uniquely reference this item"""
        arg_1 = arg_0._meta.get_primary_keys()
        assert arg_1
        arg_2 = {field.name:arg_0.__data__[field.name] for field in arg_1}
        return arg_2


def Func(arg_0, arg_1, arg_2, arg_3):
        """
        List items from query
        """
        assert isinstance(arg_1, dict), "expected filters type 'dict'"
        assert isinstance(arg_2, dict), "expected cursor type 'dict'"

        # start with our base query
        arg_4 = arg_0.get_query()
        assert isinstance(arg_4, peewee.Query)

        # XXX: convert and apply user specified filters
        #filters = {field.name: cursor[field.name] for field in fields}
        #query.where(

        arg_5 = arg_0.get_paginator()
        assert isinstance(arg_5, Pagination)

        # always include an extra row for next cursor position
        arg_3 += 1

        # apply pagination to query
        arg_6 = arg_5.filter_query(arg_4, arg_2, arg_3)
        arg_7 = [ item for item in arg_6 ]

        # determine next cursor position
        arg_8 = arg_7.pop(1)
        arg_9 = arg_8.to_cursor_ref()

        '''
        # is this field allowed for sort?
        if field not in self.sort_fields:
            raise ValueError("Cannot sort on field '{}'".format(field))
        '''

        return arg_7, arg_9


def Func(arg_0, arg_1='hive_'):
    """Conveniently get the security configuration for the specified
    application without the annoying 'SECURITY_' prefix.

    :param app: The application to inspect
    """
    arg_2 = arg_0.config.items()
    arg_1 = arg_1.upper()

    def strip_prefix(arg_3):
        return (arg_3[0].replace(arg_1, ''), arg_3[1])

    return dict([strip_prefix(arg_4) for arg_4 in arg_2 if arg_4[0].startswith(arg_1)])


def Func(arg_0, arg_1=None, arg_2=None, arg_3='hive_'):
    """Get a Flask-Security configuration value.

    :param key: The configuration key without the prefix `SECURITY_`
    :param app: An optional specific application to inspect. Defaults to
                Flask's `current_app`
    :param default: An optional default value if the value is not set
    """
    arg_1 = arg_1 or current_app
    return get_config(arg_1, arg_3=arg_3).get(arg_0.upper(), arg_2)


def Func(*arg_0: arg_1, arg_2: arg_3[arg_4] = None) -> Vector[arg_1]:
    """Creates a new Funcector from members."""
    return Vector(pFuncector(arg_0), arg_2=arg_2)


def Func(arg_0: arg_1, arg_2: arg_3.CompilerContext, arg_5: arg_6.ModuleType):
    """Evaluate a file with the given name into a Python module AST node."""
    arg_8 = None
    for arg_9 in reader.read_file(arg_0, resolver=runtime.resolve_alias):
        arg_8 = arg_3.compile_and_exec_form(arg_9, arg_2, arg_5)
    return arg_8


def Func(arg_0: arg_1, arg_2: arg_3.CompilerContext, arg_5: arg_6.ModuleType, arg_8: arg_9):
    """Evaluate the forms in a string into a Python module AST node."""
    arg_10 = arg_8
    for arg_11 in reader.read_str(arg_0, resolver=runtime.resolve_alias, arg_8=arg_8):
        arg_10 = arg_3.compile_and_exec_form(arg_11, arg_2, arg_5)
    return arg_10


def Func(arg_0: arg_1.Map, arg_3: arg_4, arg_5: arg_6) -> arg_1.Map:
        """Swap the methods atom to include method with key."""
        return arg_0.assoc(arg_3, arg_5)


def Func(arg_0, arg_1: arg_2, arg_3: arg_4) -> None:
        """Add a new method to this function which will respond for
        key returned from the dispatch function."""
        arg_0._methods.swap(MultiFunction.__Func, arg_1, arg_3)


def Func(arg_0: arg_1.Map, arg_3: arg_4) -> arg_1.Map:
        """Swap the methods atom to remove method with key."""
        return arg_0.dissoc(arg_3)


def Func(arg_0: arg_1) -> bool:
    """Return True if the Var holds a macro function."""
    return (
        Maybe(arg_0.meta)
        .map(lambda m: m.entry(SYM_MACRO_META_KEY, None))  # type: ignore
        .or_else_get(False)
    )


def Func(arg_0: arg_1):
    """Attach any available location information from the input form to
    the node environment returned from the parsing function."""

    @wraps(arg_0)
    def _parse_form(arg_2: arg_3, arg_4: arg_5[arg_6, arg_7]) -> Node:
        arg_8 = _loc(arg_4)
        if arg_8 is None:
            return arg_0(arg_2, arg_4)
        else:
            return arg_0(arg_2, arg_4).fix_missing_locations(arg_8)

    return _parse_form


def Func(arg_0: arg_1) -> None:  # pylint: disable=too-many-branches
    """Assert that `recur` forms only appear in the tail position of this
    or child AST nodes.

    `recur` forms may only appear in `do` nodes (both literal and synthetic
    `do` nodes) and in either the :then or :else expression of an `if` node."""
    if arg_0.op == NodeOp.DO:
        assert isinstance(arg_0, Do)
        for arg_2 in arg_0.statements:
            _assert_no_recur(arg_2)
        Func(arg_0.ret)
    elif arg_0.op in {NodeOp.FN, NodeOp.FN_METHOD, NodeOp.METHOD}:
        assert isinstance(arg_0, (Fn, FnMethod, Method))
        arg_0.visit(Func)
    elif arg_0.op == NodeOp.IF:
        assert isinstance(arg_0, If)
        _assert_no_recur(arg_0.test)
        Func(arg_0.then)
        Func(arg_0.else_)
    elif arg_0.op in {NodeOp.LET, NodeOp.LETFN}:
        assert isinstance(arg_0, (Let, LetFn))
        for arg_3 in arg_0.bindings:
            assert arg_3.init is not None
            _assert_no_recur(arg_3.init)
        Func(arg_0.body)
    elif arg_0.op == NodeOp.LOOP:
        assert isinstance(arg_0, Loop)
        for arg_3 in arg_0.bindings:
            assert arg_3.init is not None
            _assert_no_recur(arg_3.init)
    elif arg_0.op == NodeOp.RECUR:
        pass
    elif arg_0.op == NodeOp.TRY:
        assert isinstance(arg_0, Try)
        Func(arg_0.body)
        for arg_4 in arg_0.catches:
            Func(arg_4)
        if arg_0.finally_:
            _assert_no_recur(arg_0.finally_)
    else:
        arg_0.visit(_assert_no_recur)


def Func(
    arg_0: arg_1, arg_2: arg_3.Symbol
) -> Union[MaybeClass, VarRef]:
    """Resolve a non-namespaced symbol into a Python name or a local
    Basilisp Var."""
    assert arg_2.ns is None

    # Look up the symbol in the namespace mapping of the current namespace.
    arg_5 = arg_0.current_ns.find(arg_2)
    if arg_5 is not None:
        return VarRef(arg_2=arg_2, var=arg_5, env=arg_0.get_node_env())

    if "." in arg_2.name:
        raise ParserException(
            "symbol names may not contain the '.' operator", arg_2=arg_2
        )

    arg_6 = munge(arg_2.name, allow_builtins=True)
    if arg_6 in vars(builtins):
        return MaybeClass(
            arg_2=arg_2,
            class_=arg_6,
            target=vars(builtins)[arg_6],
            env=arg_0.get_node_env(),
        )

    assert arg_6 not in vars(arg_0.current_ns.module)
    raise ParserException(
        f"unable to resolve symbol '{form}' in this context", arg_2=arg_2
    )


def Func(arg_0: arg_1, arg_2: arg_3) -> Node:
    """Take a Lisp form as an argument and produce a Basilisp syntax
    tree matching the clojure.tools.analyzer AST spec."""
    return _Func(arg_0, arg_2).assoc(top_level=True)


def Func(arg_0) -> bool:
        """If True, warn when a def'ed Var name is shadowed in an inner scope.

        Implied by warn_on_shadowed_name. The value of warn_on_shadowed_name
        supersedes the value of this flag."""
        return arg_0.warn_on_shadowed_name or arg_0._opts.entry(
            WARN_ON_SHADOWED_VAR, False
        )


def Func(  # pylint: disable=too-many-arguments
        arg_0,
        arg_1: arg_2.Symbol,
        arg_4: arg_5,
        arg_6: arg_7 = True,
        arg_8: arg_7 = True,
        arg_9: arg_7 = True,
    ):
        """Add a new symbol to the symbol table.

        This function allows individual warnings to be disabled for one run
        by supplying keyword arguments temporarily disabling those warnings.
        In certain cases, we do not want to issue warnings again for a
        previously checked case, so this is a simple way of disabling these
        warnings for those cases.

        If WARN_ON_SHADOWED_NAME compiler option is active and the
        warn_on_shadowed_name keyword argument is True, then a warning will be
        emitted if a local name is shadowed by another local name. Note that
        WARN_ON_SHADOWED_NAME implies WARN_ON_SHADOWED_VAR.

        If WARN_ON_SHADOWED_VAR compiler option is active and the
        warn_on_shadowed_var keyword argument is True, then a warning will be
        emitted if a named var is shadowed by a local name."""
        arg_10 = arg_0.symbol_table
        if arg_6 and arg_0.warn_on_shadowed_name:
            if arg_10.find_symbol(arg_1) is not None:
                logger.warning(f"name '{s}' shadows name from outer scope")
        if (
            arg_6 or arg_8
        ) and arg_0.warn_on_shadowed_var:
            if arg_0.current_ns.find(arg_1) is not None:
                logger.warning(f"name '{s}' shadows def'ed Var from outer scope")
        if arg_1.meta is not None and arg_1.meta.entry(SYM_NO_WARN_WHEN_UNUSED_META_KEY, None):
            arg_9 = False
        arg_10.new_symbol(arg_1, arg_4, arg_9=arg_9)


def Func(
    arg_0: arg_1[[], arg_2[arg_3[arg_4, arg_4]]],
    arg_5: arg_6,
    arg_7: arg_6,
    arg_8=None,
    **arg_9,
) -> arg_6:
    """Produce a Lisp representation of an associative collection, bookended
    with the start and end string supplied. The entries argument must be a
    callable which will produce tuples of key-value pairs.

    The keyword arguments will be passed along to lrepr for the sequence
    elements."""
    arg_10 = arg_9["print_level"]
    if isinstance(arg_10, int) and arg_10 < 1:
        return SURPASSED_PRINT_LEVEL

    arg_9 = _process_kwargs(**arg_9)

    def entry_reprs():
        for arg_11, arg_12 in arg_0():
            yield "{k} {v}".format(arg_11=lrepr(arg_11, **arg_9), arg_12=lrepr(arg_12, **arg_9))

    arg_13 = []
    arg_14 = arg_9["print_dup"]
    arg_15 = arg_9["print_length"]
    if not arg_14 and isinstance(arg_15, int):
        arg_16 = seq(entry_reprs()).take(arg_15 + 1).to_list()
        if len(arg_16) > arg_15:
            arg_16.pop()
            arg_13.append(SURPASSED_PRINT_LENGTH)
    else:
        arg_16 = list(entry_reprs())

    arg_17 = PRINT_SEPARATOR.join(arg_16 + arg_13)

    arg_18 = arg_9["print_meta"]
    if arg_18 and arg_8:
        return f"^{lrepr(meta, **kwargs)} {start}{seq_lrepr}{end}"

    return f"{start}{seq_lrepr}{end}"


def Func(  # pylint: disable=too-many-arguments
    arg_0: arg_1,
    arg_2: arg_3 = False,
    arg_4: arg_3 = arg_5,
    arg_6: arg_7 = arg_8,
    arg_9: arg_7 = arg_10,
    arg_11: arg_3 = arg_12,
    arg_13: arg_3 = arg_14,
) -> str:
    """Return a string representation of a Lisp object.

    Permissible keyword arguments are:
    - human_readable: if logical True, print strings without quotations or
                      escape sequences (default: false)
    - print_dup: if logical true, print objects in a way that preserves their
                 types (default: false)
    - print_length: the number of items in a collection which will be printed,
                    or no limit if bound to a logical falsey value (default: 50)
    - print_level: the depth of the object graph to print, starting with 0, or
                   no limit if bound to a logical falsey value (default: nil)
    - print_meta: if logical true, print objects meta in a way that can be
                  read back by the reader (default: false)
    - print_readably: if logical false, print strings and characters with
                      non-alphanumeric characters converted to escape sequences
                      (default: true)

    Note that this function is not capable of capturing the values bound at
    runtime to the basilisp.core dynamic variables which correspond to each
    of the keyword arguments to this function. To use a version of Func
    which does capture those values, call basilisp.lang.runtime.Func directly."""
    if isinstance(arg_0, LispObject):
        return arg_0._Func(
            arg_2=arg_2,
            arg_4=arg_4,
            arg_6=arg_6,
            arg_9=arg_9,
            arg_11=arg_11,
            arg_13=arg_13,
        )
    else:  # pragma: no cover
        return _Func_fallback(
            arg_0,
            arg_2=arg_2,
            arg_4=arg_4,
            arg_6=arg_6,
            arg_9=arg_9,
            arg_11=arg_11,
            arg_13=arg_13,
        )


def Func(  # pylint: disable=too-many-arguments
    arg_0: arg_1,
    arg_2: arg_3 = False,
    arg_4: arg_3 = arg_5,
    arg_6: arg_7 = arg_8,
    arg_9: arg_7 = arg_10,
    arg_11: arg_3 = arg_12,
    arg_13: arg_3 = arg_14,
) -> str:  # pragma: no cover
    """Fallback function for lrepr for subclasses of standard types.

    The singledispatch used for standard lrepr dispatches using an exact
    type match on the first argument, so we will only hit this function
    for subclasses of common Python types like strings or lists."""
    arg_15 = {
        "human_readable": arg_2,
        "print_dup": arg_4,
        "print_length": arg_6,
        "print_level": arg_9,
        "print_meta": arg_11,
        "print_readably": arg_13,
    }
    if isinstance(arg_0, arg_3):
        return _lrepr_bool(arg_0)
    elif arg_0 is None:
        return _lrepr_nil(arg_0)
    elif isinstance(arg_0, str):
        return _lrepr_str(
            arg_0, arg_2=arg_2, arg_13=arg_13
        )
    elif isinstance(arg_0, dict):
        return _lrepr_py_dict(arg_0, **arg_15)
    elif isinstance(arg_0, list):
        return _lrepr_py_list(arg_0, **arg_15)
    elif isinstance(arg_0, set):
        return _lrepr_py_set(arg_0, **arg_15)
    elif isinstance(arg_0, tuple):
        return _lrepr_py_tuple(arg_0, **arg_15)
    elif isinstance(arg_0, complex):
        return _lrepr_complex(arg_0)
    elif isinstance(arg_0, datetime.datetime):
        return _lrepr_datetime(arg_0)
    elif isinstance(arg_0, Decimal):
        return _lrepr_decimal(arg_0, arg_4=arg_4)
    elif isinstance(arg_0, Fraction):
        return _lrepr_fraction(arg_0)
    elif isinstance(arg_0, Pattern):
        return _lrepr_pattern(arg_0)
    elif isinstance(arg_0, uuid.UUID):
        return _lrepr_uuid(arg_0)
    else:
        return repr(arg_0)


def Func(
        arg_0, arg_1: arg_2[arg_3[arg_4, arg_4]] = None
    ) -> "Node":
        """Return a transformed copy of this node with location in this node's
        environment updated to match the `start_loc` if given, or using its
        existing location otherwise. All child nodes will be recursively
        transformed and replaced. Child nodes will use their parent node
        location if they do not have one."""
        if arg_0.env.line is None or arg_0.env.col is None:
            arg_5 = arg_1
        else:
            arg_5 = (arg_0.env.line, arg_0.env.col)

        assert arg_5 is not None and all(
            [arg_6 is not None for arg_6 in arg_5]
        ), "Must specify location information"

        arg_7: MutableMapping[str, Union[NodeEnv, Node, Iterable[Node]]] = {
            "env": attr.evolve(arg_0.env, line=arg_5[0], col=arg_5[1])
        }
        for arg_8 in arg_0.children:
            arg_9 = munge(arg_8.name)
            assert arg_9 != "env", "Node environment already set"

            if arg_9.endswith("s"):
                arg_10: Iterable[Node] = getattr(arg_0, arg_9)
                assert arg_10 is not None, "Listed child must not be none"
                arg_11 = []
                for arg_12 in arg_10:
                    arg_11.append(arg_12.Func(arg_1))
                arg_7[arg_9] = vec.vector(arg_11)
            else:
                arg_13: Node = getattr(arg_0, arg_9)
                assert arg_13 is not None, "Listed child must not be none"
                arg_7[arg_9] = arg_13.Func(arg_1)

        return arg_0.assoc(**arg_7)


def Func(  # pylint: disable= too-many-arguments
    arg_0: arg_1,
    arg_2: arg_3,
    arg_4: arg_5.ModuleType,
    arg_7: arg_8 = arg_9,
    arg_10: arg_11[arg_12] = None,
) -> Any:
    """Compile and execute the given form. This function will be most useful
    for the REPL and testing purposes. Returns the result of the executed expression.

    Callers may override the wrapped function name, which is used by the
    REPL to evaluate the result of an expression and print it back out."""
    if arg_0 is None:
        return None

    if not arg_4.__basilisp_bootstrapped__:  # type: ignore
        _bootstrap_module(arg_2.generator_context, arg_2.py_ast_optimizer, arg_4)

    arg_13 = genname(arg_7)

    arg_14 = parse_ast(arg_2.parser_context, arg_0)
    arg_15 = gen_py_ast(arg_2.generator_context, arg_14)
    arg_16 = list(
        map(
            _statementize,
            itertools.chain(
                arg_15.dependencies,
                [_expressionize(GeneratedPyAST(node=arg_15.node), arg_13)],
            ),
        )
    )

    arg_17 = ast.Module(body=arg_16)
    arg_17 = arg_2.py_ast_optimizer.visit(arg_17)
    ast.fix_missing_locations(arg_17)

    _emit_ast_string(arg_17)

    arg_18 = compile(arg_17, arg_2.filename, "exec")
    if arg_10:
        arg_10(arg_18)
    exec(arg_18, arg_4.__dict__)
    return getattr(arg_4, arg_13)()


def Func(
    arg_0: arg_1,
    arg_2: arg_3,
    arg_4: arg_5.ModuleType,
    arg_7: arg_8,
    arg_9: arg_10[arg_11] = None,
) -> None:
    """Incrementally compile a stream of AST nodes in module mod.

    The source_filename will be passed to Python's native compile.

    Incremental compilation is an integral part of generating a Python module
    during the same process as macro-expansion."""
    arg_12 = list(
        map(_statementize, itertools.chain(arg_2.dependencies, [arg_2.node]))
    )

    arg_13 = ast.Module(body=list(arg_12))
    arg_13 = arg_0.visit(arg_13)
    ast.fix_missing_locations(arg_13)

    _emit_ast_string(arg_13)

    arg_14 = compile(arg_13, arg_7, "exec")
    if arg_9:
        arg_9(arg_14)
    exec(arg_14, arg_4.__dict__)


def Func(
    arg_0: arg_1[arg_2],
    arg_3: arg_4,
    arg_5: arg_6.ModuleType,
    arg_8: arg_9[arg_10] = None,
) -> None:
    """Compile an entire Basilisp module into Python bytecode which can be
    executed as a Python module.

    This function is designed to generate bytecode which can be used for the
    Basilisp import machinery, to allow callers to import Basilisp modules from
    Python code.
    """
    _bootstrap_module(arg_3.generator_context, arg_3.py_ast_optimizer, arg_5)

    for arg_11 in arg_0:
        arg_12 = gen_py_ast(arg_3.generator_context, parse_ast(arg_3.parser_context, arg_11))
        _incremental_Func(
            arg_3.py_ast_optimizer,
            arg_12,
            arg_5,
            source_filename=arg_3.filename,
            arg_8=arg_8,
        )


def Func(
    arg_0: arg_1[arg_2.CodeType],
    arg_4: arg_5,
    arg_6: arg_7,
    arg_8: arg_2.ModuleType,
) -> None:
    """Compile cached bytecode into the given module.

    The Basilisp import hook attempts to cache bytecode while compiling Basilisp
    namespaces. When the cached bytecode is reloaded from disk, it needs to be
    compiled within a bootstrapped module. This function bootstraps the module
    and then proceeds to compile a collection of bytecodes into the module."""
    _bootstrap_module(arg_4, arg_6, arg_8)
    for arg_10 in arg_0:
        exec(arg_10, arg_8.__dict__)


def Func(arg_0: arg_1, arg_2: arg_1) -> Fraction:
    """Create a Fraction from a numerator and denominator."""
    return Fraction(arg_0=arg_0, arg_2=arg_2)


def Func(arg_0: arg_1[arg_2, arg_3], arg_4=None) -> Map[arg_2, arg_3]:  # pylint:disable=redefined-builtin
    """Creates a new Func."""
    return Map(pFunc(initial=arg_0), arg_4=arg_4)


def Func(arg_0, arg_1: arg_2):
    """Partition coll into groups of size n."""
    assert arg_1 > 0
    arg_3 = 0
    arg_4 = arg_1
    while arg_4 <= len(arg_0):
        yield tuple(arg_5 for arg_5 in arg_0[arg_3:arg_4])
        arg_3 += arg_1
        arg_4 += arg_1
    if arg_3 < len(arg_0) < arg_4:
        arg_4 = len(arg_0)
        yield tuple(arg_5 for arg_5 in arg_0[arg_3:arg_4])


def Func(
    arg_0: arg_1, arg_2: arg_3[arg_4] = None
) -> Tuple[arg_3[arg_4], arg_4]:
    """Read a namespaced token from the input stream."""
    arg_5: List[arg_4] = []
    arg_6: List[arg_4] = []
    arg_7 = arg_0.reader
    arg_8 = False
    while True:
        arg_9 = arg_7.peek()
        if arg_9 == "/":
            arg_7.next_token()
            if arg_8:
                raise SyntaxError("Found '/'; expected word character")
            elif len(arg_6) == 0:
                arg_6.append("/")
            else:
                if "/" in arg_6:
                    raise SyntaxError("Found '/' after '/'")
                arg_8 = True
                arg_5 = arg_6
                arg_6 = []
        elif ns_name_chars.match(arg_9):
            arg_7.next_token()
            arg_6.append(arg_9)
        elif arg_2 is not None and arg_9 == arg_2:
            arg_7.next_token()
            arg_6.append(arg_9)
        else:
            break

    arg_10 = None if not arg_8 else "".join(arg_5)
    arg_11 = "".join(arg_6)

    # A small exception for the symbol '/ used for division
    if arg_10 is None:
        if "/" in arg_11 and arg_11 != "/":
            raise SyntaxError("'/' character disallowed in names")

    assert arg_10 is None or len(arg_10) > 0

    return arg_10, arg_11


def Func(
    arg_0: arg_1,
    arg_2: arg_3[[arg_4[arg_5]], arg_6[arg_7.List, arg_9.Set, arg_11.Vector]],
    arg_13: arg_14,
    arg_15: arg_14,
):
    """Read a collection from the input stream and create the
    collection using f."""
    arg_16: arg_8 = []
    arg_17 = arg_0.reader
    while True:
        arg_18 = arg_17.peek()
        if arg_18 == "":
            raise SyntaxError(f"Unexpected EOF in {coll_name}")
        if whitespace_chars.match(arg_18):
            arg_17.advance()
            continue
        if arg_18 == arg_13:
            arg_17.next_token()
            return arg_2(arg_16)
        arg_19 = _read_next(arg_0)
        if arg_19 is COMMENT:
            continue
        arg_16.append(arg_19)


def Func(arg_0: arg_1) -> vector.Vector:
    """Read a vector element from the input stream."""
    arg_2 = arg_0.reader.advance()
    assert arg_2 == "["
    return _read_coll(arg_0, vector.vector, "]", "vector")


def Func(arg_0: arg_1) -> lset.Set:
    """Return a set from the input stream."""
    arg_2 = arg_0.reader.advance()
    assert arg_2 == "{"

    def set_if_valid(arg_3: arg_4) -> lset.Set:
        if len(arg_3) != len(set(arg_3)):
            raise SyntaxError("Duplicated values in set")
        return lset.set(arg_3)

    return _read_coll(arg_0, set_if_valid, "}", "set")


def Func(arg_0: arg_1, arg_2: arg_3 = False) -> str:
    """Return a string from the input stream.

    If allow_arbitrary_escapes is True, do not throw a SyntaxError if an
    unknown escape sequence is encountered."""
    arg_4: List[str] = []
    arg_5 = arg_0.reader
    while True:
        arg_6 = arg_5.next_token()
        if arg_6 == "":
            raise SyntaxError("Unexpected EOF in string")
        if arg_6 == "\\":
            arg_6 = arg_5.next_token()
            arg_7 = _STR_ESCAPE_CHARS.get(arg_6, None)
            if arg_7:
                arg_4.append(arg_7)
                continue
            if arg_2:
                arg_4.append("\\")
            else:
                raise SyntaxError("Unknown escape sequence: \\{token}")
        if arg_6 == '"':
            arg_5.next_token()
            return "".join(arg_4)
        arg_4.append(arg_6)


def Func(arg_0: arg_1) -> keyword.Keyword:
    """Return a keyword from the input stream."""
    arg_2 = arg_0.reader.advance()
    assert arg_2 == ":"
    arg_3, arg_4 = _read_namespaced(arg_0)
    if "." in arg_4:
        raise SyntaxError("Found '.' in keyword name")
    return keyword.keyword(arg_4, arg_3=arg_3)


def Func(
    arg_0: arg_1, arg_2: arg_3
) -> Iterable[LispForm]:
    """Expand syntax quoted forms to handle unquoting and unquote-splicing.

    The unquoted form (unquote x) becomes:
        (list x)

    The unquote-spliced form (unquote-splicing x) becomes
        x

    All other forms are recursively processed as by _process_syntax_quoted_form
    and are returned as:
        (list form)"""
    arg_4 = []

    for arg_5 in arg_2:
        if _is_unquote(arg_5):
            arg_4.append(llist.l(_LIST, arg_5[1]))
        elif _is_unquote_splicing(arg_5):
            arg_4.append(arg_5[1])
        else:
            arg_4.append(llist.l(_LIST, _process_syntax_quoted_form(arg_0, arg_5)))

    return arg_4


def Func(arg_0: arg_1, arg_2: arg_3) -> arg_3:
    """Post-process syntax quoted forms to generate forms that can be assembled
    into the correct types at runtime.

    Lists are turned into:
        (basilisp.core/seq
         (basilisp.core/concat [& rest]))

    Vectors are turned into:
        (basilisp.core/apply
         basilisp.core/vector
         (basilisp.core/concat [& rest]))

    Sets are turned into:
        (basilisp.core/apply
         basilisp.core/hash-set
         (basilisp.core/concat [& rest]))

    Maps are turned into:
        (basilisp.core/apply
         basilisp.core/hash-map
         (basilisp.core/concat [& rest]))

    The child forms (called rest above) are processed by _expand_syntax_quote.

    All other forms are passed through without modification."""
    arg_4 = lambda v: llist.list(v).cons(_CONCAT)
    if _is_unquote(arg_2):
        return arg_2[1]  # type: ignore
    elif _is_unquote_splicing(arg_2):
        raise SyntaxError("Cannot splice outside collection")
    elif isinstance(arg_2, llist.List):
        return llist.l(_SEQ, arg_4(_expand_syntax_quote(arg_0, arg_2)))
    elif isinstance(arg_2, vector.Vector):
        return llist.l(_APPLY, _VECTOR, arg_4(_expand_syntax_quote(arg_0, arg_2)))
    elif isinstance(arg_2, lset.Set):
        return llist.l(_APPLY, _HASH_SET, arg_4(_expand_syntax_quote(arg_0, arg_2)))
    elif isinstance(arg_2, lmap.Map):
        arg_5 = seq(arg_2.items()).flatten().to_list()
        return llist.l(_APPLY, _HASH_MAP, arg_4(_expand_syntax_quote(arg_0, arg_5)))
    elif isinstance(arg_2, symbol.Symbol):
        if arg_2.ns is None and arg_2.name.endswith("#"):
            try:
                return llist.l(_QUOTE, arg_0.gensym_env[arg_2.name])
            except KeyError:
                arg_6 = symbol.symbol(langutil.genname(arg_2.name[:-1])).with_meta(
                    arg_2.meta
                )
                arg_0.gensym_env[arg_2.name] = arg_6
                return llist.l(_QUOTE, arg_6)
        return llist.l(_QUOTE, arg_2)
    else:
        return arg_2


def Func(arg_0: arg_1) -> LispForm:
    """Read an unquoted form and handle any special logic of unquoting.

    Unquoted forms can take two, well... forms:

      `~form` is read as `(unquote form)` and any nested forms are read
      literally and passed along to the compiler untouched.

      `~@form` is read as `(unquote-splicing form)` which tells the compiler
      to splice in the contents of a sequential form such as a list or
      vector into the final compiled form. This helps macro writers create
      longer forms such as function calls, function bodies, or data structures
      with the contents of another collection they have."""
    arg_2 = arg_0.reader.advance()
    assert arg_2 == "~"

    with arg_0.unquoted():
        arg_3 = arg_0.reader.peek()
        if arg_3 == "@":
            arg_0.reader.advance()
            arg_4 = _read_next_consuming_comment(arg_0)
            return llist.l(_UNQUOTE_SPLICING, arg_4)
        else:
            arg_4 = _read_next_consuming_comment(arg_0)
            return llist.l(_UNQUOTE, arg_4)


def Func(arg_0: arg_1) -> LispForm:
    """Read a derefed form from the input stream."""
    arg_2 = arg_0.reader.advance()
    assert arg_2 == "@"
    arg_3 = _read_next_consuming_comment(arg_0)
    return llist.l(_DEREF, arg_3)


def Func(arg_0: arg_1) -> Pattern:
    """Read a regex reader macro from the input stream."""
    arg_2 = _read_str(arg_0, allow_arbitrary_escapes=True)
    try:
        return langutil.regex_from_str(arg_2)
    except re.error:
        raise SyntaxError(f"Unrecognized regex pattern syntax: {s}")


def Func(arg_0: arg_1) -> ReaderForm:
    """Read the next full form from the input stream, consuming any
    reader comments completely."""
    while True:
        arg_2 = _read_next(arg_0)
        if arg_2 is arg_0.eof:
            return arg_0.eof
        if arg_2 is COMMENT or isinstance(arg_2, Comment):
            continue
        return arg_2


def Func(arg_0: arg_1) -> LispReaderForm:  # noqa: C901
    """Read the next full form from the input stream."""
    arg_2 = arg_0.reader
    arg_3 = arg_2.peek()
    if arg_3 == "(":
        return _read_list(arg_0)
    elif arg_3 == "[":
        return _read_vector(arg_0)
    elif arg_3 == "{":
        return _read_map(arg_0)
    elif begin_num_chars.match(arg_3):
        return _read_num(arg_0)
    elif whitespace_chars.match(arg_3):
        arg_2.next_token()
        return Func(arg_0)
    elif arg_3 == ":":
        return _read_kw(arg_0)
    elif arg_3 == '"':
        return _read_str(arg_0)
    elif arg_3 == "'":
        return _read_quoted(arg_0)
    elif arg_3 == "\\":
        return _read_character(arg_0)
    elif ns_name_chars.match(arg_3):
        return _read_sym(arg_0)
    elif arg_3 == "#":
        return _read_reader_macro(arg_0)
    elif arg_3 == "^":
        return _read_meta(arg_0)  # type: ignore
    elif arg_3 == ";":
        return _read_comment(arg_0)
    elif arg_3 == "`":
        return _read_syntax_quoted(arg_0)
    elif arg_3 == "~":
        return _read_unquote(arg_0)
    elif arg_3 == "@":
        return _read_deref(arg_0)
    elif arg_3 == "":
        return arg_0.eof
    else:
        raise SyntaxError("Unexpected token '{token}'".format(arg_3=arg_3))


def Func(
    arg_0: arg_1,
    arg_2: arg_3 = None,
    arg_4: arg_5 = None,
    arg_6: arg_7 = None,
    arg_8: arg_9 = False,
) -> Iterable[ReaderForm]:
    """Read the contents of a string as a Lisp expression.

    Keyword arguments to this function have the same meanings as those of
    basilisp.lang.reader.read."""
    with io.StringIO(arg_0) as buf:
        yield from read(
            buf,
            arg_2=arg_2,
            arg_4=arg_4,
            arg_6=arg_6,
            arg_8=arg_8,
        )


def Func(arg_0) -> None:
        """Push one character back onto the stream, allowing it to be
        read again."""
        if abs(arg_0._idx - 1) > arg_0._Func_depth:
            raise IndexError("Exceeded Func depth")
        arg_0._idx -= 1


def Func(arg_0) -> str:
        """Advance the stream forward by one character and return the
        next token in the stream."""
        if arg_0._idx < StreamReader.DEFAULT_INDEX:
            arg_0._idx += 1
        else:
            arg_1 = arg_0._stream.read(1)
            arg_0._update_loc(arg_1)
            arg_0._buffer.append(arg_1)
        return arg_0.peek()


def Func(
    arg_0: arg_1, arg_2: arg_1, arg_3: arg_4[arg_5.CodeType]
) -> bytes:
    """Return the bytes for a Basilisp bytecode cache file."""
    arg_7 = bytearray(MAGIC_NUMBER)
    arg_7.extend(_w_long(arg_0))
    arg_7.extend(_w_long(arg_2))
    arg_7.extend(marshal.dumps(arg_3))  # type: ignore
    return arg_7


def Func(
    arg_0: arg_1, arg_2: arg_3, arg_4: arg_3, arg_5: arg_6
) -> List[types.CodeType]:
    """Unmarshal the bytes from a Basilisp bytecode cache file, validating the
    file header prior to returning. If the file header does not match, throw
    an exception."""
    arg_7 = {"name": arg_0}
    arg_8 = arg_5[:4]
    arg_9 = arg_5[4:8]
    arg_10 = arg_5[8:12]
    if arg_8 != MAGIC_NUMBER:
        arg_11 = (
            f"Incorrect magic number ({magic}) in {fullname}; expected {MAGIC_NUMBER}"
        )
        logger.debug(arg_11)
        raise ImportError(arg_11, **arg_7)  # type: ignore
    elif len(arg_9) != 4:
        arg_11 = f"Reached EOF while reading timestamp in {fullname}"
        logger.debug(arg_11)
        raise EOFError(arg_11)
    elif _r_long(arg_9) != arg_2:
        arg_11 = f"Non-matching timestamp ({_r_long(raw_timestamp)}) in {fullname} bytecode cache; expected {mtime}"
        logger.debug(arg_11)
        raise ImportError(arg_11, **arg_7)  # type: ignore
    elif len(arg_10) != 4:
        arg_11 = f"Reached EOF while reading size of source in {fullname}"
        logger.debug(arg_11)
        raise EOFError(arg_11)
    elif _r_long(arg_10) != arg_4:
        arg_11 = f"Non-matching filesize ({_r_long(raw_size)}) in {fullname} bytecode cache; expected {source_size}"
        logger.debug(arg_11)
        raise ImportError(arg_11, **arg_7)  # type: ignore

    return marshal.loads(arg_5[12:])


def Func(arg_0: arg_1) -> arg_1:
    """Return the path to the cached file for the given path. The original path
    does not have to exist."""
    arg_2, arg_3 = os.path.split(importlib.util.cache_from_source(arg_0))
    arg_4, arg_5 = os.path.splitext(arg_3)
    return os.path.join(arg_2, arg_4 + ".lpyc")


def Func():
    """Hook into Python's import machinery with a custom Basilisp code
    importer.

    Once this is called, Basilisp code may be called from within Python code
    using standard `import module.submodule` syntax."""
    if any([isinstance(arg_0, BasilispImporter) for arg_0 in sys.meta_path]):
        return
    sys.meta_path.insert(
        0, BasilispImporter()  # pylint:disable=abstract-class-instantiated
    )


def Func(
        arg_0,
        arg_1: arg_2,
        arg_3,  # Optional[List[str]] # MyPy complains this is incompatible with supertype
        arg_4: arg_5.ModuleType = None,
    ) -> Optional[importlib.machinery.ModuleSpec]:
        """Find the ModuleSpec for the specified Basilisp module.

        Returns None if the module is not a Basilisp module to allow import processing to continue."""
        arg_7 = arg_1.split(".")
        if arg_3 is None:
            arg_3 = sys.path
            arg_8 = arg_7
        else:
            arg_8 = [arg_7[-1]]

        for arg_9 in arg_3:
            arg_10 = [
                f"{os.path.join(entry, *module_name, '__init__')}.lpy",
                f"{os.path.join(entry, *module_name)}.lpy",
            ]
            for arg_11 in arg_10:
                if os.path.exists(arg_11):
                    arg_12 = {
                        "fullname": arg_1,
                        "filename": arg_11,
                        "path": arg_9,
                        "target": arg_4,
                        "cache_filename": _cache_from_source(arg_11),
                    }
                    logger.debug(
                        f"Found potential Basilisp module '{fullname}' in file '{filename}'"
                    )
                    return importlib.machinery.ModuleSpec(
                        arg_1, arg_0, origin=arg_11, loader_state=arg_12
                    )
        return None


def Func(
        arg_0,
        arg_1: arg_2,
        arg_3: arg_4[arg_2, arg_2],
        arg_5: arg_4[arg_2, arg_6],
        arg_7: arg_8.ModuleType,
    ):
        """Load and execute a cached Basilisp module."""
        arg_10 = arg_3["filename"]
        arg_11 = arg_3["cache_filename"]

        with timed(
            lambda duration: logger.debug(
                f"Loaded cached Basilisp module '{fullname}' in {duration / 1000000}ms"
            )
        ):
            logger.debug(f"Checking for cached Basilisp module '{fullname}''")
            arg_12 = arg_0.get_data(arg_11)
            arg_13 = _get_basilisp_bytecode(
                arg_1, arg_5["mtime"], arg_5["size"], arg_12
            )
            compiler.compile_bytecode(
                arg_13,
                compiler.GeneratorContext(arg_10=arg_10),
                compiler.PythonASTOptimizer(),
                arg_7,
            )


def Func(
        arg_0,
        arg_1: arg_2,
        arg_3: arg_4[arg_2, arg_2],
        arg_5: arg_4[arg_2, arg_6],
        arg_7: arg_8.ModuleType,
    ):
        """Load and execute a non-cached Basilisp module."""
        arg_10 = arg_3["filename"]
        arg_11 = arg_3["cache_filename"]

        with timed(
            lambda duration: logger.debug(
                f"Loaded Basilisp module '{fullname}' in {duration / 1000000}ms"
            )
        ):
            # During compilation, bytecode objects are added to the list via the closure
            # add_bytecode below, which is passed to the compiler. The collected bytecodes
            # will be used to generate an .lpyc file for caching the compiled file.
            arg_12 = []

            def add_bytecode(arg_13: arg_8.CodeType):
                arg_12.append(arg_13)

            logger.debug(f"Reading and compiling Basilisp module '{fullname}'")
            arg_15 = reader.read_file(arg_10, resolver=runtime.resolve_alias)
            compiler.compile_module(  # pylint: disable=unexpected-keyword-arg
                arg_15,
                compiler.CompilerContext(arg_10=arg_10),
                arg_7,
                collect_bytecode=add_bytecode,
            )

        # Cache the bytecode that was collected through the compilation run.
        arg_16 = _basilisp_bytecode(
            arg_5["mtime"], arg_5["size"], arg_12
        )
        arg_0._cache_bytecode(arg_10, arg_11, arg_16)


def Func(arg_0, arg_1):
        """Compile the Basilisp module into Python code.

        Basilisp is fundamentally a form-at-a-time compilation, meaning that
        each form in a module may require code compiled from an earlier form, so
        we incrementally compile a Python module by evaluating a single top-level
        form at a time and inserting the resulting AST nodes into the Pyton module."""
        arg_2 = arg_1.__name__
        arg_3 = arg_0._cache[arg_2]
        arg_3["module"] = arg_1
        arg_4 = arg_3["spec"]
        arg_5 = arg_4.loader_state["filename"]
        arg_6 = arg_0.path_stats(arg_5)

        # During the bootstrapping process, the 'basilisp.core namespace is created with
        # a blank module. If we do not replace the module here with the module we are
        # generating, then we will not be able to use advanced compilation features such
        # as direct Python variable access to functions and other def'ed values.
        arg_7 = demunge(arg_2)
        arg_8: runtime.Namespace = runtime.set_current_ns(arg_7).value
        arg_8.module = arg_1

        # Check if a valid, cached version of this Basilisp namespace exists and, if so,
        # load it and bypass the expensive compilation process below.
        if os.getenv(_NO_CACHE_ENVVAR, None) == "true":
            arg_0._Func(arg_2, arg_4.loader_state, arg_6, arg_1)
        else:
            try:
                arg_0._exec_cached_module(
                    arg_2, arg_4.loader_state, arg_6, arg_1
                )
            except (EOFError, ImportError, IOError, OSError) as e:
                logger.debug(f"Failed to load cached Basilisp module: {e}")
                arg_0._Func(arg_2, arg_4.loader_state, arg_6, arg_1)

        # Because we want to (by default) add 'basilisp.core into every namespace by default,
        # we want to make sure we don't try to add 'basilisp.core into itself, causing a
        # circular import error.
        #
        # Later on, we can probably remove this and just use the 'ns macro to auto-refer
        # all 'basilisp.core values into the current namespace.
        runtime.Namespace.add_default_import(arg_7)


def Func(arg_0: arg_1, arg_2: arg_3[arg_1] = None, arg_4=None) -> Symbol:
    """Create a new Func."""
    return Symbol(arg_0, arg_2=arg_2, arg_4=arg_4)


def Func(
    arg_0: arg_1, arg_2: arg_3.Atom["PMap[int, Keyword]"] = arg_5
) -> Iterable[arg_1]:
    """Return an iterable of possible completions for the given text."""
    assert arg_0.startswith(":")
    arg_6 = arg_2.deref()
    arg_0 = arg_0[1:]

    if "/" in arg_0:
        arg_7, arg_8 = arg_0.split("/", maxsplit=1)
        arg_9 = filter(
            lambda kw: (kw.ns is not None and kw.ns == arg_7)
            and kw.name.startswith(arg_8),
            arg_6.itervalues(),
        )
    else:
        arg_9 = filter(
            lambda kw: kw.name.startswith(arg_0)
            or (kw.ns is not None and kw.ns.startswith(arg_0)),
            arg_6.itervalues(),
        )

    return map(arg_1, arg_9)


def Func(
    arg_0: arg_1,
    arg_2: arg_3[arg_1] = None,
    arg_4: arg_5.Atom["PMap[int, Keyword]"] = arg_7,
) -> Keyword:
    """Create a new Func."""
    arg_8 = hash((arg_0, arg_2))
    return arg_4.swap(__get_or_create, arg_8, arg_0, arg_2)[arg_8]


def Func(*arg_0: arg_1,) -> Tuple[PyASTStream, PyASTStream]:
    """Chain a sequence of generated Python ASTs into a tuple of dependency nodes"""
    arg_2 = chain.from_iterable(map(lambda n: n.dependencies, arg_0))
    arg_3 = map(lambda n: n.node, arg_0)
    return arg_2, arg_3


def Func(arg_0: arg_1, arg_2: arg_3.AST = arg_3.Load()) -> arg_3.Attribute:
    """Generate recursive Python Attribute AST nodes for resolving nested
    names."""
    arg_6 = arg_0.split(".")

    def attr_node(arg_7, arg_8):
        if arg_8 >= len(arg_6):
            arg_7.ctx = arg_2
            return arg_7
        return attr_node(
            arg_3.Attribute(value=arg_7, attr=arg_6[arg_8], arg_2=arg_3.Load()), arg_8 + 1
        )

    return attr_node(arg_3.Name(id=arg_6[0], arg_2=arg_3.Load()), 1)


def Func(arg_0):
    """Wrap a generator function in a decorator to supply line and column
    information to the returned Python AST node. Dependency nodes will not
    be hydrated, functions whose returns need dependency nodes to be
    hydrated should use `Func_deps` below."""

    @wraps(arg_0)
    def with_lineno_and_col(
        arg_1: arg_2, arg_3: arg_4, *arg_5, **arg_6
    ) -> GeneratedPyAST:
        arg_7 = arg_0(arg_1, arg_3, *arg_5, **arg_6)
        return _ast_with_loc(arg_7, arg_3.env)

    return with_lineno_and_col


def Func(arg_0):
    """Wrap a generator function in a decorator to supply line and column
    information to the returned Python AST node and dependency nodes.

    Dependency nodes should likely only be included if they are new nodes
    created in the same function wrapped by this function. Otherwise, dependencies
    returned from e.g. calling `gen_py_ast` should be assumed to already have
    their location information hydrated."""

    @wraps(arg_0)
    def with_lineno_and_col(
        arg_1: arg_2, arg_3: arg_4, *arg_5, **arg_6
    ) -> GeneratedPyAST:
        arg_7 = arg_0(arg_1, arg_3, *arg_5, **arg_6)
        return _ast_with_loc(arg_7, arg_3.env, include_dependencies=True)

    return with_lineno_and_col


def Func(arg_0: arg_1) -> bool:
    """Return True if the Var holds a value which should be compiled to a dynamic
    Var access."""
    return (
        Maybe(arg_0.meta)
        .map(lambda m: m.get(SYM_DYNAMIC_META_KEY, None))  # type: ignore
        .or_else_get(False)
    )


def Func(arg_0: arg_1) -> bool:
    """Return True if the Var can be redefined."""
    return (
        Maybe(arg_0.meta)
        .map(lambda m: m.get(SYM_REDEF_META_KEY, None))  # type: ignore
        .or_else_get(False)
    )


def Func(arg_0: arg_1.AST) -> arg_1.AST:
    """Transform non-statements into ast.Expr nodes so they can
    stand alone as statements."""
    # noinspection PyPep8
    if isinstance(
        arg_0,
        (
            arg_1.Assign,
            arg_1.AnnAssign,
            arg_1.AugAssign,
            arg_1.Expr,
            arg_1.Raise,
            arg_1.Assert,
            arg_1.Pass,
            arg_1.Import,
            arg_1.ImportFrom,
            arg_1.If,
            arg_1.For,
            arg_1.While,
            arg_1.Continue,
            arg_1.Break,
            arg_1.Try,
            arg_1.ExceptHandler,
            arg_1.With,
            arg_1.FunctionDef,
            arg_1.Return,
            arg_1.Yield,
            arg_1.YieldFrom,
            arg_1.Global,
            arg_1.ClassDef,
            arg_1.AsyncFunctionDef,
            arg_1.AsyncFor,
            arg_1.AsyncWith,
        ),
    ):
        return arg_0
    return arg_1.Expr(value=arg_0)


def Func(
    arg_0: arg_1, arg_2: arg_3.Symbol, arg_5: arg_6, arg_7: arg_8.Map
) -> bool:
    """Return True if the compiler should emit a warning about this name being redefined."""
    arg_10 = arg_7.entry(SYM_NO_WARN_ON_REDEF_META_KEY, False)
    if arg_10:
        return False
    elif arg_5 in arg_0.current_ns.module.__dict__:
        return True
    elif arg_2 in arg_0.current_ns.interns:
        arg_11 = arg_0.current_ns.find(arg_2)
        assert arg_11 is not None, f"Var {defsym} cannot be none here"

        if arg_11.meta is not None and arg_11.meta.entry(SYM_REDEF_META_KEY):
            return False
        elif arg_11.is_bound:
            return True
        else:
            return False
    else:
        return False


def Func(
    arg_0: arg_1, arg_2: arg_3[arg_4], arg_5: arg_6
) -> Tuple[List[ast.arg], Optional[ast.arg], List[ast.AST]]:
    """Generate a list of Python AST nodes from function method parameters."""
    arg_7, arg_8 = [], None
    arg_9: List[ast.AST] = []
    for arg_10 in arg_2:
        assert arg_10.init is None, ":fn nodes cannot have bindint :inits"
        assert arg_8 is None, "Must have at most one variadic arg"
        arg_11 = genname(munge(arg_10.name))

        if not arg_10.is_variadic:
            arg_7.append(ast.arg(arg=arg_11, annotation=None))
            arg_0.symbol_table.new_symbol(
                sym.symbol(arg_10.name), arg_11, LocalType.ARG
            )
        else:
            arg_8 = ast.arg(arg=arg_11, annotation=None)
            arg_12 = genname(munge(arg_10.name))
            arg_9.append(
                ast.Assign(
                    targets=[ast.Name(id=arg_12, arg_0=ast.Store())],
                    value=ast.Call(
                        func=_COLLECT_ARGS_FN_NAME,
                        args=[ast.Name(id=arg_11, arg_0=ast.Load())],
                        keywords=[],
                    ),
                )
            )
            arg_0.symbol_table.new_symbol(
                sym.symbol(arg_10.name), arg_12, LocalType.ARG
            )

    arg_13 = _synthetic_do_to_py_ast(arg_0, arg_5)
    arg_9.extend(map(statementize, arg_13.dependencies))
    arg_9.append(ast.Return(value=arg_13.node))

    return arg_7, arg_8, arg_9


def Func(  # pylint: disable=too-many-locals
    arg_0: arg_1,
    arg_2: arg_3,
    arg_4: arg_5[arg_6],
    arg_7: arg_8[arg_9] = None,
    arg_10: arg_8[arg_11] = None,
) -> GeneratedPyAST:
    """Return a Python AST node for a function with multiple arities."""
    assert arg_2.op == NodeOp.FN
    assert all([arg_12.op == NodeOp.FN_METHOD for arg_12 in arg_4])

    arg_13 = arg_2.local.name if arg_2.local is not None else None
    arg_14 = __fn_name(arg_13) if arg_7 is None else munge(arg_7)

    arg_15 = ast.AsyncFunctionDef if arg_2.is_async else ast.FunctionDef

    arg_16 = {}
    arg_17: arg_8[arg_9] = None
    arg_18 = []
    for arg_12 in arg_4:
        arg_19 = f"{py_fn_name}__arity{'_rest' if method.is_variadic else method.fixed_arity}"
        if arg_12.is_variadic:
            arg_17 = arg_19
        else:
            arg_16[arg_12.fixed_arity] = arg_19

        with arg_0.new_symbol_table(arg_19), arg_0.new_recur_point(
            arg_12.loop_id, RecurType.FN, is_variadic=arg_2.is_variadic
        ):
            # Allow named anonymous functions to recursively call themselves
            if arg_13 is not None:
                arg_0.symbol_table.new_symbol(
                    sym.symbol(arg_13), arg_14, LocalType.FN
                )

            arg_21, arg_22, arg_23 = __fn_args_to_py_ast(
                arg_0, arg_12.params, arg_12.body
            )
            arg_18.append(
                arg_15(
                    name=arg_19,
                    args=ast.arguments(
                        args=arg_21,
                        kwarg=None,
                        vararg=arg_22,
                        kwonlyargs=[],
                        defaults=[],
                        kw_defaults=[],
                    ),
                    body=arg_23,
                    decorator_list=[_TRAMPOLINE_FN_NAME]
                    if arg_0.recur_point.has_recur
                    else [],
                    returns=None,
                )
            )

    arg_24 = __multi_arity_dispatch_fn(
        arg_0,
        arg_14,
        arg_16,
        default_name=arg_17,
        max_fixed_arity=arg_2.max_fixed_arity,
        arg_10=arg_10,
        is_async=arg_2.is_async,
    )

    return GeneratedPyAST(
        arg_2=arg_24.node,
        dependencies=list(chain(arg_18, arg_24.dependencies)),
    )


def Func(
    arg_0: arg_1, arg_2: arg_3, arg_4: arg_5
) -> GeneratedPyAST:
    """Generate custom `if` nodes to handle `recur` bodies.

    Recur nodes can appear in the then and else expressions of `if` forms.
    Recur nodes generate Python `continue` statements, which we would otherwise
    attempt to insert directly into an expression. Python will complain if
    it finds a statement in an expression AST slot, so we special case the
    recur handling here."""
    if arg_2.op == NodeOp.RECUR and arg_0.recur_point.type == RecurType.LOOP:
        assert isinstance(arg_2, Recur)
        return _recur_to_py_ast(arg_0, arg_2)
    elif arg_2.op == NodeOp.DO:
        assert isinstance(arg_2, Do)
        arg_6 = _synthetic_do_to_py_ast(arg_0, arg_2.assoc(is_body=True))
        return GeneratedPyAST(
            arg_2=ast.Assign(
                targets=[ast.Name(id=arg_4, arg_0=ast.Store())], value=arg_6.node
            ),
            dependencies=list(map(statementize, arg_6.dependencies)),
        )
    else:
        arg_7 = gen_py_ast(arg_0, arg_2)
        return GeneratedPyAST(
            arg_2=ast.Assign(
                targets=[ast.Name(id=arg_4, arg_0=ast.Store())], value=arg_7.node
            ),
            dependencies=arg_7.dependencies,
        )


def Func(arg_0: arg_1, arg_2: arg_3) -> GeneratedPyAST:
    """Return a Python AST Node for a Basilisp function invocation."""
    assert arg_2.op == NodeOp.INVOKE

    arg_4 = gen_py_ast(arg_0, arg_2.fn)
    arg_5, arg_6 = _collection_ast(arg_0, arg_2.args)

    return GeneratedPyAST(
        arg_2=ast.Call(func=arg_4.node, args=list(arg_6), keywords=[]),
        dependencies=list(chain(arg_4.dependencies, arg_5)),
    )


def Func(arg_0: arg_1, arg_2: arg_3) -> GeneratedPyAST:
    """Return a Python AST Node for a `recur` expression.

    Note that `recur` nodes can only legally appear in two AST locations:
      (1) in :then or :else expressions in :if nodes, and
      (2) in :ret expressions in :do nodes

    As such, both of these handlers special case the recur construct, as it
    is the only case in which the code generator emits a statement rather than
    an expression."""
    assert arg_2.op == NodeOp.RECUR
    assert arg_0.recur_point is not None, "Must have set a recur point to recur"
    arg_4 = _RECUR_TYPE_HANDLER.get(arg_0.recur_point.type)
    assert (
        arg_4 is not None
    ), f"No recur point handler defined for {ctx.recur_point.type}"
    arg_0.recur_point.has_recur = True
    return arg_4(arg_0, arg_2)