ShwStone/humaneval-leetcode huggingface dataset:
def createSortedArray(instructions: List[int]) -> int:
    """
    Given an integer array instructions, you are asked to create a sorted array from the elements in instructions. You start with an empty container nums. For each element from left to right in instructions, insert it into nums. The cost of each insertion is the minimum of the following:\r
    \r
    \r
    	The number of elements currently in nums that are strictly less than instructions[i].\r
    	The number of elements currently in nums that are strictly greater than instructions[i].\r
    \r
    \r
    For example, if inserting element 3 into nums = [1,2,3,5], the cost of insertion is min(2, 1) (elements 1 and 2 are less than 3, element 5 is greater than 3) and nums will become [1,2,3,3,5].\r
    \r
    Return the total cost to insert all elements from instructions into nums. Since the answer may be large, return it modulo 109 + 7\r
    \r
     \r
    Example 1:\r
    \r
    \r
    >>> createSortedArray(instructions = [1,5,6,2]\r)
    >>> 1\r
    Explanation: Begin with nums = [].\r
    Insert 1 with cost min(0, 0) = 0, now nums = [1].\r
    Insert 5 with cost min(1, 0) = 0, now nums = [1,5].\r
    Insert 6 with cost min(2, 0) = 0, now nums = [1,5,6].\r
    Insert 2 with cost min(1, 2) = 1, now nums = [1,2,5,6].\r
    The total cost is 0 + 0 + 0 + 1 = 1.\r
    \r
    Example 2:\r
    \r
    \r
    >>> createSortedArray(instructions = [1,2,3,6,5,4]\r)
    >>> 3\r
    Explanation: Begin with nums = [].\r
    Insert 1 with cost min(0, 0) = 0, now nums = [1].\r
    Insert 2 with cost min(1, 0) = 0, now nums = [1,2].\r
    Insert 3 with cost min(2, 0) = 0, now nums = [1,2,3].\r
    Insert 6 with cost min(3, 0) = 0, now nums = [1,2,3,6].\r
    Insert 5 with cost min(3, 1) = 1, now nums = [1,2,3,5,6].\r
    Insert 4 with cost min(3, 2) = 2, now nums = [1,2,3,4,5,6].\r
    The total cost is 0 + 0 + 0 + 0 + 1 + 2 = 3.\r
    \r
    \r
    Example 3:\r
    \r
    \r
    >>> createSortedArray(instructions = [1,3,3,3,2,4,2,1,2]\r)
    >>> 4\r
    Explanation: Begin with nums = [].\r
    Insert 1 with cost min(0, 0) = 0, now nums = [1].\r
    Insert 3 with cost min(1, 0) = 0, now nums = [1,3].\r
    Insert 3 with cost min(1, 0) = 0, now nums = [1,3,3].\r
    Insert 3 with cost min(1, 0) = 0, now nums = [1,3,3,3].\r
    Insert 2 with cost min(1, 3) = 1, now nums = [1,2,3,3,3].\r
    Insert 4 with cost min(5, 0) = 0, now nums = [1,2,3,3,3,4].\r
    ​​​​​​​Insert 2 with cost min(1, 4) = 1, now nums = [1,2,2,3,3,3,4].\r
    ​​​​​​​Insert 1 with cost min(0, 6) = 0, now nums = [1,1,2,2,3,3,3,4].\r
    ​​​​​​​Insert 2 with cost min(2, 4) = 2, now nums = [1,1,2,2,2,3,3,3,4].\r
    The total cost is 0 + 0 + 0 + 0 + 1 + 0 + 1 + 0 + 2 = 4.\r
    \r
    \r
     \r
    """
def decrypt(code: List[int], k: int) -> List[int]:
    """
    You have a bomb to defuse, and your time is running out! Your informer will provide you with a circular array code of length of n and a key k.
    To decrypt the code, you must replace every number. All the numbers are replaced simultaneously.
    
    If k > 0, replace the ith number with the sum of the next k numbers.
    If k < 0, replace the ith number with the sum of the previous k numbers.
    If k == 0, replace the ith number with 0.
    
    As code is circular, the next element of code[n-1] is code[0], and the previous element of code[0] is code[n-1].
    Given the circular array code and an integer key k, return the decrypted code to defuse the bomb!
    
    Example 1:
    
    >>> decrypt(code = [5,7,1,4], k = 3)
    >>> [12,10,16,13]
    Explanation: Each number is replaced by the sum of the next 3 numbers. The decrypted code is [7+1+4, 1+4+5, 4+5+7, 5+7+1]. Notice that the numbers wrap around.
    
    Example 2:
    
    >>> decrypt(code = [1,2,3,4], k = 0)
    >>> [0,0,0,0]
    Explanation: When k is zero, the numbers are replaced by 0.
    
    Example 3:
    
    >>> decrypt(code = [2,4,9,3], k = -2)
    >>> [12,5,6,13]
    Explanation: The decrypted code is [3+9, 2+3, 4+2, 9+4]. Notice that the numbers wrap around again. If k is negative, the sum is of the previous numbers.
    """
def minimumDeletions(s: str) -> int:
    """
    You are given a string s consisting only of characters 'a' and 'b'​​​​.
    You can delete any number of characters in s to make s balanced. s is balanced if there is no pair of indices (i,j) such that i < j and s[i] = 'b' and s[j]= 'a'.
    Return the minimum number of deletions needed to make s balanced.
    
    Example 1:
    
    >>> minimumDeletions(s = "aababbab")
    >>> 2
    Explanation: You can either:
    Delete the characters at 0-indexed positions 2 and 6 ("aababbab" -> "aaabbb"), or
    Delete the characters at 0-indexed positions 3 and 6 ("aababbab" -> "aabbbb").
    
    Example 2:
    
    >>> minimumDeletions(s = "bbaaaaabb")
    >>> 2
    Explanation: The only solution is to delete the first two characters.
    """
def minimumJumps(forbidden: List[int], a: int, b: int, x: int) -> int:
    """
    A certain bug's home is on the x-axis at position x. Help them get there from position 0.
    The bug jumps according to the following rules:
    
    It can jump exactly a positions forward (to the right).
    It can jump exactly b positions backward (to the left).
    It cannot jump backward twice in a row.
    It cannot jump to any forbidden positions.
    
    The bug may jump forward beyond its home, but it cannot jump to positions numbered with negative integers.
    Given an array of integers forbidden, where forbidden[i] means that the bug cannot jump to the position forbidden[i], and integers a, b, and x, return the minimum number of jumps needed for the bug to reach its home. If there is no possible sequence of jumps that lands the bug on position x, return -1.
    
    Example 1:
    
    >>> minimumJumps(forbidden = [14,4,18,1,15], a = 3, b = 15, x = 9)
    >>> 3
    Explanation: 3 jumps forward (0 -> 3 -> 6 -> 9) will get the bug home.
    
    Example 2:
    
    >>> minimumJumps(forbidden = [8,3,16,6,12,20], a = 15, b = 13, x = 11)
    >>> -1
    
    Example 3:
    
    >>> minimumJumps(forbidden = [1,6,2,14,5,17,4], a = 16, b = 9, x = 7)
    >>> 2
    Explanation: One jump forward (0 -> 16) then one jump backward (16 -> 7) will get the bug home.
    """
def canDistribute(nums: List[int], quantity: List[int]) -> bool:
    """
    You are given an array of n integers, nums, where there are at most 50 unique values in the array. You are also given an array of m customer order quantities, quantity, where quantity[i] is the amount of integers the ith customer ordered. Determine if it is possible to distribute nums such that:
    
    The ith customer gets exactly quantity[i] integers,
    The integers the ith customer gets are all equal, and
    Every customer is satisfied.
    
    Return true if it is possible to distribute nums according to the above conditions.
    
    Example 1:
    
    >>> canDistribute(nums = [1,2,3,4], quantity = [2])
    >>> false
    Explanation: The 0th customer cannot be given two different integers.
    
    Example 2:
    
    >>> canDistribute(nums = [1,2,3,3], quantity = [2])
    >>> true
    Explanation: The 0th customer is given [3,3]. The integers [1,2] are not used.
    
    Example 3:
    
    >>> canDistribute(nums = [1,1,2,2], quantity = [2,2])
    >>> true
    Explanation: The 0th customer is given [1,1], and the 1st customer is given [2,2].
    """
def closeStrings(word1: str, word2: str) -> bool:
    """
    Two strings are considered close if you can attain one from the other using the following operations:
    
    Operation 1: Swap any two existing characters.
    
    
    For example, abcde -> aecdb
    
    
    Operation 2: Transform every occurrence of one existing character into another existing character, and do the same with the other character.
    
    For example, aacabb -> bbcbaa (all a's turn into b's, and all b's turn into a's)
    
    
    
    You can use the operations on either string as many times as necessary.
    Given two strings, word1 and word2, return true if word1 and word2 are close, and false otherwise.
    
    Example 1:
    
    >>> closeStrings(word1 = "abc", word2 = "bca")
    >>> true
    Explanation: You can attain word2 from word1 in 2 operations.
    Apply Operation 1: "abc" -> "acb"
    Apply Operation 1: "acb" -> "bca"
    
    Example 2:
    
    >>> closeStrings(word1 = "a", word2 = "aa")
    >>> false
    Explanation: It is impossible to attain word2 from word1, or vice versa, in any number of operations.
    
    Example 3:
    
    >>> closeStrings(word1 = "cabbba", word2 = "abbccc")
    >>> true
    Explanation: You can attain word2 from word1 in 3 operations.
    Apply Operation 1: "cabbba" -> "caabbb"
    Apply Operation 2: "caabbb" -> "baaccc"
    Apply Operation 2: "baaccc" -> "abbccc"
    """
def minOperations(nums: List[int], x: int) -> int:
    """
    You are given an integer array nums and an integer x. In one operation, you can either remove the leftmost or the rightmost element from the array nums and subtract its value from x. Note that this modifies the array for future operations.
    Return the minimum number of operations to reduce x to exactly 0 if it is possible, otherwise, return -1.
    
    Example 1:
    
    >>> minOperations(nums = [1,1,4,2,3], x = 5)
    >>> 2
    Explanation: The optimal solution is to remove the last two elements to reduce x to zero.
    
    Example 2:
    
    >>> minOperations(nums = [5,6,7,8,9], x = 4)
    >>> -1
    
    Example 3:
    
    >>> minOperations(nums = [3,2,20,1,1,3], x = 10)
    >>> 5
    Explanation: The optimal solution is to remove the last three elements and the first two elements (5 operations in total) to reduce x to zero.
    """
def getMaxGridHappiness(m: int, n: int, introvertsCount: int, extrovertsCount: int) -> int:
    """
    You are given four integers, m, n, introvertsCount, and extrovertsCount. You have an m x n grid, and there are two types of people: introverts and extroverts. There are introvertsCount introverts and extrovertsCount extroverts.
    You should decide how many people you want to live in the grid and assign each of them one grid cell. Note that you do not have to have all the people living in the grid.
    The happiness of each person is calculated as follows:
    
    Introverts start with 120 happiness and lose 30 happiness for each neighbor (introvert or extrovert).
    Extroverts start with 40 happiness and gain 20 happiness for each neighbor (introvert or extrovert).
    
    Neighbors live in the directly adjacent cells north, east, south, and west of a person's cell.
    The grid happiness is the sum of each person's happiness. Return the maximum possible grid happiness.
    
    Example 1:
    
    
    >>> getMaxGridHappiness(m = 2, n = 3, introvertsCount = 1, extrovertsCount = 2)
    >>> 240
    Explanation: Assume the grid is 1-indexed with coordinates (row, column).
    We can put the introvert in cell (1,1) and put the extroverts in cells (1,3) and (2,3).
    - Introvert at (1,1) happiness: 120 (starting happiness) - (0 * 30) (0 neighbors) = 120
    - Extrovert at (1,3) happiness: 40 (starting happiness) + (1 * 20) (1 neighbor) = 60
    - Extrovert at (2,3) happiness: 40 (starting happiness) + (1 * 20) (1 neighbor) = 60
    The grid happiness is 120 + 60 + 60 = 240.
    The above figure shows the grid in this example with each person's happiness. The introvert stays in the light green cell while the extroverts live on the light purple cells.
    
    Example 2:
    
    >>> getMaxGridHappiness(m = 3, n = 1, introvertsCount = 2, extrovertsCount = 1)
    >>> 260
    Explanation: Place the two introverts in (1,1) and (3,1) and the extrovert at (2,1).
    - Introvert at (1,1) happiness: 120 (starting happiness) - (1 * 30) (1 neighbor) = 90
    - Extrovert at (2,1) happiness: 40 (starting happiness) + (2 * 20) (2 neighbors) = 80
    - Introvert at (3,1) happiness: 120 (starting happiness) - (1 * 30) (1 neighbor) = 90
    The grid happiness is 90 + 80 + 90 = 260.
    
    Example 3:
    
    >>> getMaxGridHappiness(m = 2, n = 2, introvertsCount = 4, extrovertsCount = 0)
    >>> 240
    """
def arrayStringsAreEqual(word1: List[str], word2: List[str]) -> bool:
    """
    Given two string arrays word1 and word2, return true if the two arrays represent the same string, and false otherwise.
    A string is represented by an array if the array elements concatenated in order forms the string.
    
    Example 1:
    
    >>> arrayStringsAreEqual(word1 = ["ab", "c"], word2 = ["a", "bc"])
    >>> true
    Explanation:
    word1 represents string "ab" + "c" -> "abc"
    word2 represents string "a" + "bc" -> "abc"
    The strings are the same, so return true.
    Example 2:
    
    >>> arrayStringsAreEqual(word1 = ["a", "cb"], word2 = ["ab", "c"])
    >>> false
    
    Example 3:
    
    >>> arrayStringsAreEqual(word1  = ["abc", "d", "defg"], word2 = ["abcddefg"])
    >>> true
    """
def getSmallestString(n: int, k: int) -> str:
    """
    The numeric value of a lowercase character is defined as its position (1-indexed) in the alphabet, so the numeric value of a is 1, the numeric value of b is 2, the numeric value of c is 3, and so on.
    The numeric value of a string consisting of lowercase characters is defined as the sum of its characters' numeric values. For example, the numeric value of the string "abe" is equal to 1 + 2 + 5 = 8.
    You are given two integers n and k. Return the lexicographically smallest string with length equal to n and numeric value equal to k.
    Note that a string x is lexicographically smaller than string y if x comes before y in dictionary order, that is, either x is a prefix of y, or if i is the first position such that x[i] != y[i], then x[i] comes before y[i] in alphabetic order.
    
    Example 1:
    
    >>> getSmallestString(n = 3, k = 27)
    >>> "aay"
    Explanation: The numeric value of the string is 1 + 1 + 25 = 27, and it is the smallest string with such a value and length equal to 3.
    
    Example 2:
    
    >>> getSmallestString(n = 5, k = 73)
    >>> "aaszz"
    """
def waysToMakeFair(nums: List[int]) -> int:
    """
    You are given an integer array nums. You can choose exactly one index (0-indexed) and remove the element. Notice that the index of the elements may change after the removal.
    For example, if nums = [6,1,7,4,1]:
    
    Choosing to remove index 1 results in nums = [6,7,4,1].
    Choosing to remove index 2 results in nums = [6,1,4,1].
    Choosing to remove index 4 results in nums = [6,1,7,4].
    
    An array is fair if the sum of the odd-indexed values equals the sum of the even-indexed values.
    Return the number of indices that you could choose such that after the removal, nums is fair.
    
    Example 1:
    
    >>> waysToMakeFair(nums = [2,1,6,4])
    >>> 1
    Explanation:
    Remove index 0: [1,6,4] -> Even sum: 1 + 4 = 5. Odd sum: 6. Not fair.
    Remove index 1: [2,6,4] -> Even sum: 2 + 4 = 6. Odd sum: 6. Fair.
    Remove index 2: [2,1,4] -> Even sum: 2 + 4 = 6. Odd sum: 1. Not fair.
    Remove index 3: [2,1,6] -> Even sum: 2 + 6 = 8. Odd sum: 1. Not fair.
    There is 1 index that you can remove to make nums fair.
    
    Example 2:
    
    >>> waysToMakeFair(nums = [1,1,1])
    >>> 3
    Explanation: You can remove any index and the remaining array is fair.
    
    Example 3:
    
    >>> waysToMakeFair(nums = [1,2,3])
    >>> 0
    Explanation: You cannot make a fair array after removing any index.
    """
def minimumEffort(tasks: List[List[int]]) -> int:
    """
    You are given an array tasks where tasks[i] = [actuali, minimumi]:
    
    actuali is the actual amount of energy you spend to finish the ith task.
    minimumi is the minimum amount of energy you require to begin the ith task.
    
    For example, if the task is [10, 12] and your current energy is 11, you cannot start this task. However, if your current energy is 13, you can complete this task, and your energy will be 3 after finishing it.
    You can finish the tasks in any order you like.
    Return the minimum initial amount of energy you will need to finish all the tasks.
    
    Example 1:
    
    >>> minimumEffort(tasks = [[1,2],[2,4],[4,8]])
    >>> 8
    Explanation:
    Starting with 8 energy, we finish the tasks in the following order:
        - 3rd task. Now energy = 8 - 4 = 4.
        - 2nd task. Now energy = 4 - 2 = 2.
        - 1st task. Now energy = 2 - 1 = 1.
    Notice that even though we have leftover energy, starting with 7 energy does not work because we cannot do the 3rd task.
    Example 2:
    
    >>> minimumEffort(tasks = [[1,3],[2,4],[10,11],[10,12],[8,9]])
    >>> 32
    Explanation:
    Starting with 32 energy, we finish the tasks in the following order:
        - 1st task. Now energy = 32 - 1 = 31.
        - 2nd task. Now energy = 31 - 2 = 29.
        - 3rd task. Now energy = 29 - 10 = 19.
        - 4th task. Now energy = 19 - 10 = 9.
        - 5th task. Now energy = 9 - 8 = 1.
    Example 3:
    
    >>> minimumEffort(tasks = [[1,7],[2,8],[3,9],[4,10],[5,11],[6,12]])
    >>> 27
    Explanation:
    Starting with 27 energy, we finish the tasks in the following order:
        - 5th task. Now energy = 27 - 5 = 22.
        - 2nd task. Now energy = 22 - 2 = 20.
        - 3rd task. Now energy = 20 - 3 = 17.
        - 1st task. Now energy = 17 - 1 = 16.
        - 4th task. Now energy = 16 - 4 = 12.
        - 6th task. Now energy = 12 - 6 = 6.
    """
def maxRepeating(sequence: str, word: str) -> int:
    """
    For a string sequence, a string word is k-repeating if word concatenated k times is a substring of sequence. The word's maximum k-repeating value is the highest value k where word is k-repeating in sequence. If word is not a substring of sequence, word's maximum k-repeating value is 0.
    Given strings sequence and word, return the maximum k-repeating value of word in sequence.
    
    Example 1:
    
    >>> maxRepeating(sequence = "ababc", word = "ab")
    >>> 2
    Explanation: "abab" is a substring in "ababc".
    
    Example 2:
    
    >>> maxRepeating(sequence = "ababc", word = "ba")
    >>> 1
    Explanation: "ba" is a substring in "ababc". "baba" is not a substring in "ababc".
    
    Example 3:
    
    >>> maxRepeating(sequence = "ababc", word = "ac")
    >>> 0
    Explanation: "ac" is not a substring in "ababc".
    """
# class ListNode:
#     def __init__(val=0, next=None):
#         self.val = val
#         self.next = next
class Solution:
    def mergeInBetween(list1: ListNode, a: int, b: int, list2: ListNode) -> ListNode:
    """
    You are given two linked lists: list1 and list2 of sizes n and m respectively.
    Remove list1's nodes from the ath node to the bth node, and put list2 in their place.
    The blue edges and nodes in the following figure indicate the result:
    
    Build the result list and return its head.
    
    Example 1:
    
    
    >>> __init__(list1 = [10,1,13,6,9,5], a = 3, b = 4, list2 = [1000000,1000001,1000002])
    >>> [10,1,13,1000000,1000001,1000002,5]
    Explanation: We remove the nodes 3 and 4 and put the entire list2 in their place. The blue edges and nodes in the above figure indicate the result.
    
    Example 2:
    
    
    >>> __init__(list1 = [0,1,2,3,4,5,6], a = 2, b = 5, list2 = [1000000,1000001,1000002,1000003,1000004])
    >>> [0,1,1000000,1000001,1000002,1000003,1000004,6]
    Explanation: The blue edges and nodes in the above figure indicate the result.
    """
def minimumMountainRemovals(nums: List[int]) -> int:
    """
    You may recall that an array arr is a mountain array if and only if:
    
    arr.length >= 3
    There exists some index i (0-indexed) with 0 < i < arr.length - 1 such that:
    
    arr[0] < arr[1] < ... < arr[i - 1] < arr[i]
    arr[i] > arr[i + 1] > ... > arr[arr.length - 1]
    
    
    
    Given an integer array nums​​​, return the minimum number of elements to remove to make nums​​​ a mountain array.
    
    Example 1:
    
    >>> minimumMountainRemovals(nums = [1,3,1])
    >>> 0
    Explanation: The array itself is a mountain array so we do not need to remove any elements.
    
    Example 2:
    
    >>> minimumMountainRemovals(nums = [2,1,1,5,6,2,3,1])
    >>> 3
    Explanation: One solution is to remove the elements at indices 0, 1, and 5, making the array nums = [1,5,6,3,1].
    """
def maximumWealth(accounts: List[List[int]]) -> int:
    """
    You are given an m x n integer grid accounts where accounts[i][j] is the amount of money the i​​​​​​​​​​​th​​​​ customer has in the j​​​​​​​​​​​th​​​​ bank. Return the wealth that the richest customer has.
    A customer's wealth is the amount of money they have in all their bank accounts. The richest customer is the customer that has the maximum wealth.
    
    Example 1:
    
    >>> maximumWealth(accounts = [[1,2,3],[3,2,1]])
    >>> 6
    Explanation:
    1st customer has wealth = 1 + 2 + 3 = 6
    2nd customer has wealth = 3 + 2 + 1 = 6
    Both customers are considered the richest with a wealth of 6 each, so return 6.
    
    Example 2:
    
    >>> maximumWealth(accounts = [[1,5],[7,3],[3,5]])
    >>> 10
    Explanation:
    1st customer has wealth = 6
    2nd customer has wealth = 10
    3rd customer has wealth = 8
    The 2nd customer is the richest with a wealth of 10.
    Example 3:
    
    >>> maximumWealth(accounts = [[2,8,7],[7,1,3],[1,9,5]])
    >>> 17
    """
def mostCompetitive(nums: List[int], k: int) -> List[int]:
    """
    Given an integer array nums and a positive integer k, return the most competitive subsequence of nums of size k.
    An array's subsequence is a resulting sequence obtained by erasing some (possibly zero) elements from the array.
    We define that a subsequence a is more competitive than a subsequence b (of the same length) if in the first position where a and b differ, subsequence a has a number less than the corresponding number in b. For example, [1,3,4] is more competitive than [1,3,5] because the first position they differ is at the final number, and 4 is less than 5.
    
    Example 1:
    
    >>> mostCompetitive(nums = [3,5,2,6], k = 2)
    >>> [2,6]
    Explanation: Among the set of every possible subsequence: {[3,5], [3,2], [3,6], [5,2], [5,6], [2,6]}, [2,6] is the most competitive.
    
    Example 2:
    
    >>> mostCompetitive(nums = [2,4,3,3,5,4,9,6], k = 4)
    >>> [2,3,3,4]
    """
def minMoves(nums: List[int], limit: int) -> int:
    """
    You are given an integer array nums of even length n and an integer limit. In one move, you can replace any integer from nums with another integer between 1 and limit, inclusive.
    The array nums is complementary if for all indices i (0-indexed), nums[i] + nums[n - 1 - i] equals the same number. For example, the array [1,2,3,4] is complementary because for all indices i, nums[i] + nums[n - 1 - i] = 5.
    Return the minimum number of moves required to make nums complementary.
    
    Example 1:
    
    >>> minMoves(nums = [1,2,4,3], limit = 4)
    >>> 1
    Explanation: In 1 move, you can change nums to [1,2,2,3] (underlined elements are changed).
    nums[0] + nums[3] = 1 + 3 = 4.
    nums[1] + nums[2] = 2 + 2 = 4.
    nums[2] + nums[1] = 2 + 2 = 4.
    nums[3] + nums[0] = 3 + 1 = 4.
    Therefore, nums[i] + nums[n-1-i] = 4 for every i, so nums is complementary.
    
    Example 2:
    
    >>> minMoves(nums = [1,2,2,1], limit = 2)
    >>> 2
    Explanation: In 2 moves, you can change nums to [2,2,2,2]. You cannot change any number to 3 since 3 > limit.
    
    Example 3:
    
    >>> minMoves(nums = [1,2,1,2], limit = 2)
    >>> 0
    Explanation: nums is already complementary.
    """