def indent_lines(lines, open_sym, close_sym, indent, indent_step):
    """
    Indents a data structure.

    ``lines`` is an array of strings composed of each element of the data
    structure. ``open_sym`` and ``close_sym`` are strings representing the
    opening and closing symbol of the data structure (i.e.: for a dict it
    would be '{' and '}', respectively). ``indent`` is an integer representing
    the number of spaces used to indent. ``indent_step`` is an integer
    representing the current level of indentation.
    """
    indent_prev = indent_step
    indent_step = indent_prev + indent
    # open symbol should not be indented
    result = [open_sym]

    indent_spaces = indent_step * ' '
    result += [indent_spaces + line for line in lines]

    # close symbol should be indented using the previous indentation level
    result += [indent_prev * ' ' + close_sym]

    return '\n'.join(result)