import typing
import ast
from unittest.mock import call


def append(list_name: str, value: typing.Any) -> ast.Expr:
    """Appends item to given list

    Generates following code: `list_name.append(value)`
    :param list_name: list variable name
    :param value: expression for getting of value that should be appended
    :returns: append expression ast
    """
    expr = call(
        entity_name=list_name, attributes=["append"], args=[value], is_standalone=True
    )
    assert isinstance(expr, ast.Expr)
    return expr