<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _add_from_str(self, s):
 """Add locations from a string"""


        if sys.version_info[0] < 3 and isinstance(s, str):
            s = s.decode('utf-8')

        for line in s.split("\n"):
            self._parse_line(line)