<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_locations(self, ip, detailed=False):
 """Returns a list of dictionaries with location data or False on failure. Argument `ip` must be an iterable object. Amount of information about IP contained in the dictionary depends upon `detailed` flag state. """

        if isinstance(ip, str):
            ip = [ip]
            
        seek = map(self._get_pos, ip)

        return [self._parse_location(elem, detailed=detailed) if elem > 0 else False for elem in seek]