original_string: public function set_type_autocomplete($options, $attributes) {
          $this->type = 'autocomplete';
  
          $pairedoptions = [];
          foreach ($options as $key => $value) {
              $pairedoptions[] = [
                  'key' => $key,
                  'value' => $value,
              ];
          }
          $this->options = json_encode(['options' => $pairedoptions, 'attributes' => $attributes]);
          return $this;
      }
code: public function set_type_autocomplete($options, $attributes) {
          $this->type = 'autocomplete';
  
          $pairedoptions = [];
          foreach ($options as $key => $value) {
              $pairedoptions[] = [
                  'key' => $key,
                  'value' => $value,
              ];
          }
          $this->options = json_encode(['options' => $pairedoptions, 'attributes' => $attributes]);
          return $this;
      }
code_tokens: public function set_type_autocomplete ( $ options , $ attributes ) { $ this -> type = 'autocomplete' ; $ pairedoptions = [ ] ; foreach ( $ options as $ key => $ value ) { $ pairedoptions [ ] = [ 'key' => $ key , 'value' => $ value , ] ; } $ this -> options = json_encode ( [ 'options' => $ pairedoptions , 'attributes' => $ attributes ] ) ; return $ this ; }
docstring: Sets the element type to be an autocomplete field
  
  @param array $options associative array with dropdown options
  @param array $attributes associative array with attributes for autoselect field. See AMD module core/form-autocomplete.
  @return self
docstring_tokens: Sets the element type to be an autocomplete field