def clean_coordinates(self):
        coords = self.cleaned_data['coordinates'].strip()
        if not coords:
            return None
        pieces = re.split('[ ,]+', coords)

        if len(pieces) != 2:
            raise forms.ValidationError('could not understand coordinates')

        try:
            lat = float(pieces[0])
            lon = float(pieces[1])
        except __HOLE__:
            raise forms.ValidationError('could not understand coordinates')

        return [lat, lon]
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/locations/forms.py/LocationForm.clean_coordinates