original_string: public function add($input_data)
      {
          $data['inputs'] = [];
  
          if (is_array($input_data)) {
              foreach ($input_data as $image) {
                  $data['inputs'][] = $this->addNewImage($image);
              }
          } else {
              $data['inputs'][] = $this->addNewImage($input_data);
          }
  
          $inputResult = $this->getRequest()->request(
              'POST',
              $this->getRequestUrl('inputs'),
              $data
          );
  
          return $this->getInputsFromResult($inputResult);
      }
code: public function add($input_data)
      {
          $data['inputs'] = [];
  
          if (is_array($input_data)) {
              foreach ($input_data as $image) {
                  $data['inputs'][] = $this->addNewImage($image);
              }
          } else {
              $data['inputs'][] = $this->addNewImage($input_data);
          }
  
          $inputResult = $this->getRequest()->request(
              'POST',
              $this->getRequestUrl('inputs'),
              $data
          );
  
          return $this->getInputsFromResult($inputResult);
      }
code_tokens: public function add ( $ input_data ) { $ data [ 'inputs' ] = [ ] ; if ( is_array ( $ input_data ) ) { foreach ( $ input_data as $ image ) { $ data [ 'inputs' ] [ ] = $ this -> addNewImage ( $ image ) ; } } else { $ data [ 'inputs' ] [ ] = $ this -> addNewImage ( $ input_data ) ; } $ inputResult = $ this -> getRequest ( ) -> request ( 'POST' , $ this -> getRequestUrl ( 'inputs' ) , $ data ) ; return $ this -> getInputsFromResult ( $ inputResult ) ; }
docstring: Add Input Method
  
  @param $input_data
  
  @return array
  
  @throws \Exception
docstring_tokens: Add Input Method