docs: def parse_phone(parts, allow_multiple=False):
    """
      Parse the phone number from the ad's parts
        parts -> The backpage ad's posting_body, separated into substrings
        allow_multiple -> If false, arbitrarily chooses the most commonly occurring phone
    """
    
    # Get text substitutions (ex: 'three' -> '3')
    text_subs = misc.phone_text_subs()
    Small = text_subs['Small']
    Magnitude = text_subs['Magnitude']
    Others = text_subs['Others']
  
    phone_pattern = r'1?(?:[2-9][0-8][0-9])\s?(?:[2-9][0-9]{2})\s?(?:[0-9]{2})\s?(?:[0-9]{2})'
    phone_pattern_spaces = r'1?\W?[2-9]\W?[0-8]\W?[0-9]\W?[2-9]\W?[0-9]\W?[0-9]\W?[0-9]\W?[0-9]\W?[0-9]\W?[0-9]'
  
    found_phones = []
    return_parts = []
    # Check each part for phone # and remove from parts if found
    for part in parts:
      body = part
      # remove '420' references to avoid false positives
      body = re.sub(r'420 ?friendly', '', body)
      body = body.replace(' 420 ', '')
      body = body.replace('420 sp', '')
  
      # Replace all disguising characters in the body
      for key in Small:
        body = re.sub(r'-?'+re.escape(key)+r'-?', str(Small[key]), body)
      for key in Magnitude:
        body = re.sub(r'-?'+re.escape(key)+r'-?', str(Magnitude[key]), body)
      for key in Others:
        body = re.sub(r'-?'+re.escape(key)+r'-?', str(Others[key]), body)
      body = re.sub(r'\W', ' ', body)
      body = re.sub(r' +', ' ', body)
  
      if len(re.sub(r'\D', '', body)) < 10:
        # Less than 10 numeric digits in part - no phone number here
        return_parts.append(part)
        continue;
  
      phones = re.findall(phone_pattern, body)
  
      if len(phones) == 0:
        # No phone number in standard format
        phones = re.findall(phone_pattern_spaces, body)
        if len(phones) > 0:
          # Phone number had spaces between digits
          for found in phones:
            found_phones.append(re.sub(r'\D', '', found))
  
      else:
        # Found phone in standard format
        for found in phones:
          found_phones.append(re.sub(r'\D', '', found))
  
      if found_phones:
        # Phone has been found, remove from part)
        for found in found_phones:
          filtered_part = parser_helpers.remove_phone(part, found)
        if re.sub(r'\W', '', filtered_part):
          # get rid of now-empty parts
          return_parts.append(filtered_part)
      else:
        # Phone not found yet, add part to output
        return_parts.append(part)
  
    if not allow_multiple:
      # Get most commonly occurring phone
      found_phone = ''
      if len(found_phones) > 0:
        found_phone = max(set(found_phones), key=found_phones.count)
  
      # Return the phone along with the original parts (minus any occurrences of the phone number)
      return (found_phone, return_parts)
    else:
      # return all phones
      return (list(set(found_phones)), return_parts)