'Strip PaloAlto-specific output.
PaloAlto will also put a configuration context:
[edit]
This method removes those lines.'

@staticmethod
def strip_context_items(a_string):

    strings_to_strip = [u'\\[edit.*\\]']
    response_list = a_string.split(u'\n')
    last_line = response_list[(-1)]
    for pattern in strings_to_strip:
        if re.search(pattern, last_line):
            return u'\n'.join(response_list[:(-1)])
    return a_string
