MonoshiTonmoy/Code_Statement_Prediction_Dataset huggingface dataset:
Project Name: rushter+MLAlgorithms
Language: Python
Statement Type: API

Source Code:
def check_data(a, b):
    if not isinstance(a, np.ndarray):
        a = np.array(a)

    if not isinstance(b, np.ndarray):
        b = np.array(b)

    if type(a) != type(b):
        raise ValueError("Type mismatch: %s and %s" % (type(a), type(b)))

    if a.size != b.size:
        raise ValueError("Arrays must be equal in length.")
    return a, b

check_data(a=[], b=1)

Selected Statement: b = np.array(b)

Function Input:
b: 1

Variable Values Before Statement:
b: 1

Value After Statement Execution: array(1)

Variable States During Runtime (line, value):
a: 1
3
array([], dtype=float64)
b: 1
1
6
array(1)
Project Name: SkyTruth+gpsd_format
Language: Python
Statement Type: API

Source Code:
def str2datetime(string):
    """
    Convert a normalized Benthos timestamp to a datetime object

    Parameters
    ----------
    string : str
        String to convert
    """

    if string == "0000-00-00T24:60:60Z":
        return None

    ms = string[20:-1]
    ms += "000000"[:6 - len(ms)]
    return datetime.datetime(
        int(string[:4]),
        int(string[5:7]),
        int(string[8:10]),
        int(string[11:13]),
        int(string[14:16]),
        int(string[17:19]),
        int(ms))

str2datetime(string='1970-01-01T00:00:00.0Z')

Selected Statement: ms += "000000"[:6 - len(ms)]

Function Input:
string: '1970-01-01T00:00:00.0Z'

Variable Values Before Statement:
ms: '0'

Value After Statement Execution: '000000'

Variable States During Runtime (line, value):
string: 1
'1970-01-01T00:00:00.0Z'
ms: 14
'0'
15
'000000'
Project Name: amarouane-ABDLHAK+cumulus-process-py
Language: Python
Statement Type: API

Source Code:
def getLogger(name, stdout=None):
    """ Return logger suitable for Cumulus """
    logger = logging.getLogger(name)
    # clear existing handlers
    logger.handlers = []
    if (stdout is None):
        logger.addHandler(logging.NullHandler())
    if stdout is not None:
        handler = logging.StreamHandler()
        handler.setLevel(stdout['level'])
        handler.setFormatter(CumulusFormatter())
        logger.addHandler(handler)
    # logging level
    logger.setLevel(1)
    return logger

getLogger(name='cumulus.aws', stdout=None)

Selected Statement: logger = logging.getLogger(name)

Function Input:
name: 'cumulus.aws'
stdout: None

Variable Values Before Statement:
name: 'cumulus.aws'

Value After Statement Execution: <Logger cumulus.aws (WARNING)>

Variable States During Runtime (line, value):
name: 1
'cumulus.aws'
stdout: 1
None
logger: 3
<Logger cumulus.aws (WARNING)>
14
<Logger cumulus.aws (Level 1)>
Project Name: plotly+plotly.py
Language: Python
Statement Type: API

Source Code:
def load_json_dict(filename, *args):
    """Checks if file exists. Returns {} if something fails."""
    data = {}
    if os.path.exists(filename):
        lock.acquire()
        with open(filename, "r") as f:
            try:
                data = _json.load(f)
                if not isinstance(data, dict):
                    data = {}
            except:
                data = {}  # TODO: issue a warning and bubble it up
        lock.release()
        if args:
            return {key: data[key] for key in args if key in data}
    return data

load_json_dict(filename='/home/jinjun/.plotly/.config', args=())

Selected Statement: with open(filename, "r") as f:

Function Input:
filename: '/home/jinjun/.plotly/.config'
args: ()

Variable Values Before Statement:
filename: '/home/jinjun/.plotly/.config'

Value After Statement Execution: <_io.TextIOWrapper name

Variable States During Runtime (line, value):
filename: 1
'/home/jinjun/.plotly/.config'
args: 1
()
data: 3
8
plotly_domain: https://plot.ly
plotly_streaming_domain: stream.plot.ly
plotly_api_domain: https://api.plot.ly
plotly_ssl_verification: yes
plotly_proxy_authorization: no
world_readable: yes
sharing: public
auto_open: yes
f: 6
<_io.TextIOWrapper name='/home/jinjun/.plotly/.config' mode='r' encoding='UTF-8'>
Project Name: hyperopt+hyperopt
Language: Python
Statement Type: API

Source Code:
def _get_logger(name):
    """Gets a logger by name, or creates and configures it for the first time."""
    logger = logging.getLogger(name)
    logger.setLevel(logging.INFO)
    # If the logger is configured, skip the configure
    if not logger.handlers and not logging.getLogger().handlers:
        handler = logging.StreamHandler(sys.stderr)
        logger.addHandler(handler)
    return logger

_get_logger(name='hyperopt.utils')

Selected Statement: logger = logging.getLogger(name)

Function Input:
name: 'hyperopt.utils'

Variable Values Before Statement:
name: 'hyperopt.utils'

Value After Statement Execution: <Logger hyperopt.utils (WARNING)>

Variable States During Runtime (line, value):
name: 1
'hyperopt.utils'
logger: 3
<Logger hyperopt.utils (WARNING)>
4
<Logger hyperopt.utils (INFO)>
Project Name: OxfordHED+sunbear
Language: Python
Statement Type: API

Source Code:
def _test_grad2_nd(n, ndim):
    coords = [np.arange(n)] * ndim
    xc = np.meshgrid(*coords, indexing="ij")

    # u = sum_i(xc[i]**2)
    u = reduce(lambda x,y: x+y**2, xc, 0.0)
    ucopy = np.copy(u)

    # check the gradient values
    gu = np.zeros(tuple([n-2]*ndim))
    gu2 = gu + 2.0
    for i in range(ndim):
        for j in range(ndim):
            if i == j:
                assert grad2(u, axes=(i,j)) == pytest.approx(gu2)
            else:
                assert grad2(u, axes=(i,j)) == pytest.approx(gu)

    # check if u is unchanged
    assert np.all(u == ucopy)

_test_grad2_nd(n=32, ndim=1)

Selected Statement: coords = [np.arange(n)] * ndim

Function Input:
n: 32
ndim: 1

Variable Values Before Statement:
n: 32

Value After Statement Execution: [array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16,       17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31])]

Variable States During Runtime (line, value):
n: 1
32
ndim: 1
1
coords: 2
[array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16,       17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31])]
xc: 3
[array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16,       17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31])]
u: 6
array([  0.,   1.,   4.,   9.,  16.,  25.,  36.,  49.,  64.,  81., 100.,       121., 144., 169., 196., 225., 256., 289., 324., 361., 400., 441.,       484., 529., 576., 625., 676., 729., 784., 841., 900., 961.])
ucopy: 7
array([  0.,   1.,   4.,   9.,  16.,  25.,  36.,  49.,  64.,  81., 100.,       121., 144., 169., 196., 225., 256., 289., 324., 361., 400., 441.,       484., 529., 576., 625., 676., 729., 784., 841., 900., 961.])
gu: 10
array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,       0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])
gu2: 11
array([2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.,       2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.])
i: 12
0
j: 13
0
@py_assert2: 15
None
@py_assert4: 15
None
@py_assert8: 15
None
@py_assert11: 15
None
@py_assert6: 15
None
@py_assert1: 20
None
Project Name: OxfordHED+sunbear
Language: Python
Statement Type: API

Source Code:
def _get_default_expanded_coordinate(shape, ndim):
    x_coords = []
    for i in range(ndim):
        idx = [None] * ndim
        idx[i] = slice(None, None, None)
        x_coords.append(np.arange(shape[i])[tuple(idx)])
    return x_coords

_get_default_expanded_coordinate(shape=array([102]), ndim=1)

Selected Statement: x_coords.append(np.arange(shape[i])[tuple(idx)])

Function Input:
shape: array([102])
ndim: 1

Variable Values Before Statement:
idx: [slice(None, None, None)]

Value After Statement Execution: [array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,        13,  14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,        26,  27,  28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,        39,  40,  41,  42,  43,  44,  45,  46,  47,  48,  49,  50,  51,        52,  53,  54,  55,  56,  57,  58,  59,  60,  61,  62,  63,  64,        65,  66,  67,  68,  69,  70,  71,  72,  73,  74,  75,  76,  77,        78,  79,  80,  81,  82,  83,  84,  85,  86,  87,  88,  89,  90,        91,  92,  93,  94,  95,  96,  97,  98,  99, 100, 101])]

Variable States During Runtime (line, value):
shape: 1
array([102])
ndim: 1
1
x_coords: 2
6
[array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,        13,  14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,        26,  27,  28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,        39,  40,  41,  42,  43,  44,  45,  46,  47,  48,  49,  50,  51,        52,  53,  54,  55,  56,  57,  58,  59,  60,  61,  62,  63,  64,        65,  66,  67,  68,  69,  70,  71,  72,  73,  74,  75,  76,  77,        78,  79,  80,  81,  82,  83,  84,  85,  86,  87,  88,  89,  90,        91,  92,  93,  94,  95,  96,  97,  98,  99, 100, 101])]
i: 3
0
idx: 4
[None]
5
[slice(None, None, None)]
Project Name: Zulko+moviepy
Language: Python
Statement Type: API

Source Code:
def test_audioclip_stereo_max_volume(nchannels, channel_muted):
    def make_frame(t):
        frame = []
        # build channels (one of each pair muted)
        for i in range(int(nchannels / 2)):
            if channel_muted == "left":
                # if muted channel is left, [0, sound, 0, sound...]
                frame.append(np.sin(t * 0))
                frame.append(np.sin(440 * 2 * np.pi * t))
            else:
                # if muted channel is right, [sound, 0, sound, 0...]
                frame.append(np.sin(440 * 2 * np.pi * t))
                frame.append(np.sin(t * 0))
        return np.array(frame).T

    clip = AudioClip(make_frame, fps=44100, duration=1)
    max_volume = clip.max_volume(stereo=True)
    # if `stereo == True`, `AudioClip.max_volume` returns a Numpy array`
    assert isinstance(max_volume, np.ndarray)
    assert len(max_volume) == nchannels

    # check channels muted and with sound
    for i, channel_max_volume in enumerate(max_volume):
        if i % 2 == 0:
            if channel_muted == "left":
                assert channel_max_volume == 0
            else:
                assert channel_max_volume > 0
        else:
            if channel_muted == "right":
                assert channel_max_volume == 0
            else:
                assert channel_max_volume > 0

test_audioclip_stereo_max_volume(nchannels=2, channel_muted='left')

Selected Statement: assert len(max_volume) == nchannels

Function Input:
nchannels: 2
channel_muted: 'left'

Variable Values Before Statement:
max_volume: array([0.        , 0.99999975])

Value After Statement Execution: None

Variable States During Runtime (line, value):
nchannels: 1
2
channel_muted: 1
'left'
make_frame: 2
<function test_audioclip_stereo_max_volume.<locals>.make_frame at 0x7f8c02a8e670>
clip: 16
{start=0, end=1, duration=1, memoize=False, memoized_t=None, memoized_frame=None, fps=44100, nchannels=2}
max_volume: 17
array([0.        , 0.99999975])
@py_assert3: 19
None
@py_assert5: 19
None
@py_assert2: 20
None
@py_assert4: 20
None
i: 23
0
23
1
channel_max_volume: 23
0.0
23
0.999999746257887
@py_assert1: 26
None
Project Name: Zulko+moviepy
Language: Python
Statement Type: API

Source Code:
def test_clip_with_end(duration, start, end, expected_start, expected_duration):
    clip = ColorClip(color=(255, 0, 0), size=(2, 2), duration=duration).with_fps(1)
    if start is not None:
        clip = clip.with_start(start)
    else:
        clip.start = None
    clip = clip.with_end(end)

    assert clip.start == expected_start
    assert clip.duration == expected_duration

test_clip_with_end(duration=3, start=1, end=2, expected_start=1, expected_duration=1)

Selected Statement: clip = clip.with_start(start)

Function Input:
duration: 3
start: 1
end: 2
expected_start: 1
expected_duration: 1

Variable Values Before Statement:
start: 1

Value After Statement Execution: {start

Variable States During Runtime (line, value):
duration: 1
3
start: 1
1
end: 1
2
expected_start: 1
1
expected_duration: 1
1
clip: 2
{start=0, end=3, duration=3, memoize=False, memoized_t=None, memoized_frame=None, mask=None, audio=None, relative_pos=False, layer=0, is_mask=False, has_constant_size=True, size=(2, 2), img=array([[[255,   0,   0],        [255,   0,   0]],       [[255,   0,   0],        [255,   0,   0]]]), fps=1}
4
{start=1, end=4, duration=3, memoize=False, memoized_t=None, memoized_frame=None, mask=None, audio=None, relative_pos=False, layer=0, is_mask=False, has_constant_size=True, size=(2, 2), img=array([[[255,   0,   0],        [255,   0,   0]],       [[255,   0,   0],        [255,   0,   0]]]), fps=1}
7
{start=1, end=2, duration=1, memoize=False, memoized_t=None, memoized_frame=None, mask=None, audio=None, relative_pos=False, layer=0, is_mask=False, has_constant_size=True, size=(2, 2), img=array([[[255,   0,   0],        [255,   0,   0]],       [[255,   0,   0],        [255,   0,   0]]]), fps=1}
@py_assert1: 9
None
@py_assert3: 9
None
Project Name: Zulko+moviepy
Language: Python
Statement Type: API

Source Code:
def subprocess_call(cmd, logger="bar"):
    """Executes the given subprocess command.

    Set logger to None or a custom Proglog logger to avoid printings.
    """
    logger = proglog.default_bar_logger(logger)
    logger(message="MoviePy - Running:\n>>> " + " ".join(cmd))

    popen_params = cross_platform_popen_params(
        {"stdout": sp.DEVNULL, "stderr": sp.PIPE, "stdin": sp.DEVNULL}
    )

    proc = sp.Popen(cmd, **popen_params)

    out, err = proc.communicate()  # proc.wait()
    proc.stderr.close()

    if proc.returncode:
        logger(message="MoviePy - Command returned an error")
        raise IOError(err.decode("utf8"))
    else:
        logger(message="MoviePy - Command successful")

    del proc

subprocess_call(cmd=['unset', '-background', 'transparent', '-fill', 'white', '-font', 'Liberation-Mono', '-pointsize', '25', '-size', '640x480', '-gravity', 'center', 'caption:@/tmp/tmp6pdbi5v3.txt', '-type', 'truecolormatte', 'PNG32:/tmp/tmpkd0efulh.png'], logger=None)

Selected Statement: logger = proglog.default_bar_logger(logger)

Function Input:
cmd: unset, -background, transparent, -fill, white, -font, Liberation-Mono, -pointsize, 25, -size, 640x480, -gravity, center, caption:@/tmp/tmp6pdbi5v3.txt, -type, truecolormatte, PNG32:/tmp/tmpkd0efulh.png
logger: None

Variable Values Before Statement:
logger: None

Value After Statement Execution: {state

Variable States During Runtime (line, value):
cmd: 1
unset, -background, transparent, -fill, white, -font, Liberation-Mono, -pointsize, 25, -size, 640x480, -gravity, center, caption:@/tmp/tmp6pdbi5v3.txt, -type, truecolormatte, PNG32:/tmp/tmpkd0efulh.png
logger: 1
None
6
{state={'bars': OrderedDict()}, stored={}, logs=[], log_indent=0, ignored_bars=None, logged_bars='all', min_time_interval=0, ignore_bars_under=0}
7
{state={'bars': OrderedDict(), 'message': 'MoviePy - Running:\n>>> unset -background transparent -fill white -font Liberation-Mono -pointsize 25 -size 640x480 -gravity center caption:@/tmp/tmp6pdbi5v3.txt -type truecolormatte PNG32:/tmp/tmpkd0efulh.png'}, stored={}, logs=[], log_indent=0, ignored_bars=None, logged_bars='all', min_time_interval=0, ignore_bars_under=0}
popen_params: 9
stdout: -3
stderr: -1
stdin: -3
Project Name: activeloopai+deeplake
Language: Python
Statement Type: API

Source Code:
def _validate_htype_overwrites(htype: str, htype_overwrite: dict):
    """Raises errors if ``htype_overwrite`` has invalid keys or was missing required values."""

    defaults = HTYPE_CONFIGURATIONS[htype]

    for key, value in htype_overwrite.items():
        if key not in defaults:
            raise TensorMetaInvalidHtypeOverwriteKey(htype, key, list(defaults.keys()))

        if isinstance(value, str) and value == UNSPECIFIED:
            if defaults[key] == REQUIRE_USER_SPECIFICATION:
                raise TensorMetaMissingRequiredValue(htype, key)

    sc = htype_overwrite["sample_compression"]
    cc = htype_overwrite["chunk_compression"]
    compr = sc if cc in (None, UNSPECIFIED) else cc
    actual_htype = f"link[{htype}]" if htype_overwrite["is_link"] else htype
    if htype.startswith("image") and sc == UNSPECIFIED and cc == UNSPECIFIED:
        raise TensorMetaMissingRequiredValue(
            actual_htype, ["chunk_compression", "sample_compression"]  # type: ignore
        )
    if htype in ("audio", "video", "point_cloud", "mesh", "nifti"):
        if cc not in (UNSPECIFIED, None):
            raise UnsupportedCompressionError("Chunk compression", htype=htype)
        elif sc == UNSPECIFIED:
            raise TensorMetaMissingRequiredValue(
                actual_htype, "sample_compression"  # type: ignore
            )
    supported_compressions = HTYPE_SUPPORTED_COMPRESSIONS.get(htype)
    if (
        compr
        and compr != UNSPECIFIED
        and supported_compressions
        and compr not in supported_compressions
    ):
        raise UnsupportedCompressionError(compr, htype=htype)

_validate_htype_overwrites(htype='generic', htype_overwrite={'sample_compression': 'unspecified', 'chunk_compression': 'unspecified', 'dtype': 'unspecified', 'hidden': False, 'tiling_threshold': None, 'max_chunk_size': 2000000, 'is_sequence': False, 'is_link': False, 'verify': True})

Selected Statement: supported_compressions = HTYPE_SUPPORTED_COMPRESSIONS.get(htype)

Function Input:
htype: 'generic'
htype_overwrite: sample_compression: unspecified
chunk_compression: unspecified
dtype: unspecified
hidden: no
max_chunk_size: 2000000
is_sequence: no
is_link: no
verify: yes

Variable Values Before Statement:
htype: 'generic'

Value After Statement Execution: None

Variable States During Runtime (line, value):
htype: 1
'generic'
htype_overwrite: 1
sample_compression: unspecified
chunk_compression: unspecified
dtype: unspecified
hidden: no
max_chunk_size: 2000000
is_sequence: no
is_link: no
verify: yes
defaults: 4
is_sequence: no
is_link: no
hidden: no
verify: no
key: 6
'sample_compression'
6
'chunk_compression'
6
'dtype'
6
'hidden'
6
'tiling_threshold'
6
'max_chunk_size'
6
'is_sequence'
6
'is_link'
6
'verify'
value: 6
'unspecified'
6
False
6
None
6
2000000
6
False
6
True
sc: 14
'unspecified'
cc: 15
'unspecified'
compr: 16
'unspecified'
actual_htype: 17
'generic'
supported_compressions: 29
None
Project Name: activeloopai+deeplake
Language: Python
Statement Type: API

Source Code:
def serialize_chunkids(version: str, arr: np.ndarray) -> memoryview:
    """Serializes chunk ID encoders into a single byte stream. This is how the encoders will be written to the storage provider.

    Args:
        version: (str) Version of deeplake library.
        arr: (np.ndarray) Encoded chunk ids from a `ChunkIdEncoder` instance.

    Returns:
        Serialized chunk ids as memoryview.
    """
    len_version = len(version)
    write_dtype = version_compare(version, "2.7.6") >= 0
    flatbuff = bytearray(1 + int(write_dtype) + len_version + arr.nbytes)

    # Write version
    len_version = len(version)
    flatbuff[0] = len_version
    flatbuff[1 : 1 + len_version] = version.encode("ascii")
    offset = 1 + len_version

    # write encoder dtype
    if write_dtype:
        dtype = arr.dtype
        num_bytes = int(dtype.itemsize)
        flatbuff[offset] = num_bytes
        offset += 1

    # Write ids
    flatbuff[offset : offset + arr.nbytes] = arr.tobytes()
    offset += arr.nbytes
    return memoryview(flatbuff)

serialize_chunkids(version='3.8.18', arr=array([], shape=(0, 2), dtype=uint64))

Selected Statement: write_dtype = version_compare(version, "2.7.6") >= 0

Function Input:
version: '3.8.18'
arr: array([], shape=(0, 2), dtype=uint64)

Variable Values Before Statement:
version: '3.8.18'

Value After Statement Execution: True

Variable States During Runtime (line, value):
version: 1
'3.8.18'
arr: 1
array([], shape=(0, 2), dtype=uint64)
len_version: 11
6
write_dtype: 12
True
flatbuff: 13
bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00')
17
bytearray(b'\x06\x00\x00\x00\x00\x00\x00\x00')
18
bytearray(b'\x063.8.18\x00')
25
bytearray(b'\x063.8.18\x08')
offset: 19
7
26
8
dtype: 23
dtype('uint64')
num_bytes: 24
8
Project Name: benjamincrom+scrabble
Language: Python
Statement Type: API

Source Code:
def _draw_random_tile(self):
        random_index = random.randrange(0, len(self.tile_bag))
        selected_tile = self.tile_bag.pop(random_index)

        return selected_tile

_draw_random_tile(self=REPR FAILED, self.tile_bag=[*, *, A, A, A, A, A, A, A, A, A, B, B, C, C, D, D, D, D, E, E, E, E, E, E, E, E, E, E, E, E, F, F, G, G, G, H, H, I, I, I, I, I, I, I, I, I, J, K, L, L, L, L, M, M, N, N, N, N, N, N, O, O, O, O, O, O, O, O, P, P, Q, R, R, R, R, R, R, S, S, S, S, T, T, T, T, T, T, U, U, U, U, V, V, W, W, X, Y, Y, Z])

Selected Statement: selected_tile = self.tile_bag.pop(random_index)

Function Input:
self: REPR FAILED
self.tile_bag: [*, *, A, A, A, A, A, A, A, A, A, B, B, C, C, D, D, D, D, E, E, E, E, E, E, E, E, E, E, E, E, F, F, G, G, G, H, H, I, I, I, I, I, I, I, I, I, J, K, L, L, L, L, M, M, N, N, N, N, N, N, O, O, O, O, O, O, O, O, P, P, Q, R, R, R, R, R, R, S, S, S, S, T, T, T, T, T, T, U, U, U, U, V, V, W, W, X, Y, Y, Z]

Variable Values Before Statement:
random_index: 89

Value After Statement Execution: U

Variable States During Runtime (line, value):
self: 1
REPR FAILED
self.tile_bag: 1
[*, *, A, A, A, A, A, A, A, A, A, B, B, C, C, D, D, D, D, E, E, E, E, E, E, E, E, E, E, E, E, F, F, G, G, G, H, H, I, I, I, I, I, I, I, I, I, J, K, L, L, L, L, M, M, N, N, N, N, N, N, O, O, O, O, O, O, O, O, P, P, Q, R, R, R, R, R, R, S, S, S, S, T, T, T, T, T, T, U, U, U, U, V, V, W, W, X, Y, Y, Z]
3
[*, *, A, A, A, A, A, A, A, A, A, B, B, C, C, D, D, D, D, E, E, E, E, E, E, E, E, E, E, E, E, F, F, G, G, G, H, H, I, I, I, I, I, I, I, I, I, J, K, L, L, L, L, M, M, N, N, N, N, N, N, O, O, O, O, O, O, O, O, P, P, Q, R, R, R, R, R, R, S, S, S, S, T, T, T, T, T, T, U, U, U, V, V, W, W, X, Y, Y, Z]
random_index: 2
89
selected_tile: 3
U
Project Name: benjamincrom+scrabble
Language: Python
Statement Type: API

Source Code:
def move_is_sublist(letter_list_1, letter_list_2):
    letter_counter_1 = collections.Counter(letter_list_1)
    letter_counter_2 = collections.Counter(letter_list_2)
    for letter, cardinality in letter_counter_1.items():
        if cardinality > letter_counter_2[letter]:
            # print('Not enough {} tiles in rack.'.format(letter))
            return False

    return True

move_is_sublist(letter_list_1=[1, 2, 3], letter_list_2=[1, 2, 3, 4])

Selected Statement: letter_counter_2 = collections.Counter(letter_list_2)

Function Input:
letter_list_1: [1, 2, 3]
letter_list_2: [1, 2, 3, 4]

Variable Values Before Statement:
letter_list_2: [1, 2, 3, 4]

Value After Statement Execution: Counter({1: 1, 2: 1, 3: 1, 4: 1})

Variable States During Runtime (line, value):
letter_list_1: 1
[1, 2, 3]
letter_list_2: 1
[1, 2, 3, 4]
letter_counter_1: 2
Counter({1: 1, 2: 1, 3: 1})
letter_counter_2: 3
Counter({1: 1, 2: 1, 3: 1, 4: 1})
letter: 4
1
4
2
4
3
cardinality: 4
1