def METHOD_NAME(member_name, indices):
    '''
    Construct an ArrayMember instance describing an array access to a
    member of a structure.
    e.g. for the Fortran `grid%subdomains(1,2)`, `subdomains` must be an
    array and we are accessing element (1,2) of it. We would therefore
    create the ArrayMember for this access by calling:
    >>> amem = ArrayMember.create("subdomains",
                                  [Literal("1", INTEGER_TYPE),
                                   Literal("2", INTEGER_TYPE)])
    :param str member_name: the name of the member of the structure that \
        is being accessed.
    :param indices: the array-index expressions.
    :type indices: list of :py:class:`psyclone.psyir.nodes.DataNode` or
        :py:class:`psyclone.psyir.nodes.Range`
    :raises GenerationError: if the supplied `indices` argument is not \
                             a list.
    '''
    if not isinstance(indices, list):
        raise GenerationError(
            f"indices argument in create method of ArrayMember class "
            f"should be a list but found '{type(indices).__name__}'.")
    obj = ArrayMember(member_name)
    # Add any array-index expressions as children
    for child in indices:
        obj.addchild(child)
    return obj