code: def get_placeholders(arg, check_duplicates=False):
      
      placeholders = []
      last_match = None
      arg = normalize_placeholders(arg)
      for cur_match in re.finditer(r'\s*{{|}}\s*', arg):
          matched_text = cur_match.group().strip()
          if not last_match and matched_text == '{{':
              last_match = cur_match
              continue
  
          last_matched_text = '' if not last_match else last_match.group().strip()
          # Check if the positional argument is enclosed with {{ }} properly
          if (not last_matched_text and matched_text == '}}') or (last_matched_text == '{{' and matched_text != '}}'):
              raise CLIError(PLACEHOLDER_BRACKETS_ERROR.format(arg))
          elif last_matched_text == '{{' and matched_text == '}}':
              # Extract start and end index of the placeholder name
              start_index, end_index = last_match.span()[1], cur_match.span()[0]
              placeholders.append(arg[start_index: end_index].strip())
              last_match = None
  
      # last_match did not reset - that means brackets are not enclosed properly
      if last_match:
          raise CLIError(PLACEHOLDER_BRACKETS_ERROR.format(arg))
  
      # Make sure there is no duplicated placeholder names
      if check_duplicates and len(placeholders) != len(set(placeholders)):
          raise CLIError(DUPLICATED_PLACEHOLDER_ERROR.format(arg))
  
      return placeholders
docs: Get all the placeholders' names in order.
      Use the regex below to locate all the opening ({{) and closing brackets (}}).
      After that, extract "stuff" inside the brackets.
  
      Args:
          arg: The word which this function performs searching on.
          check_duplicates: True if we want to check for duplicated positional arguments.
  
      Returns:
          A list of positional arguments in order.