original_string: private function normalizeHeaders($headers)
      {
          if (is_array($headers)) {
              $headers = new Headers($headers);
          } elseif (!($headers instanceof Headers)) {
              throw new InvalidArgumentException(
                  'Headers must be an array or instance of Headers'
              );
          }
  
          return $headers;
      }
code: private function normalizeHeaders($headers)
      {
          if (is_array($headers)) {
              $headers = new Headers($headers);
          } elseif (!($headers instanceof Headers)) {
              throw new InvalidArgumentException(
                  'Headers must be an array or instance of Headers'
              );
          }
  
          return $headers;
      }
code_tokens: private function normalizeHeaders ( $ headers ) { if ( is_array ( $ headers ) ) { $ headers = new Headers ( $ headers ) ; } elseif ( ! ( $ headers instanceof Headers ) ) { throw new InvalidArgumentException ( 'Headers must be an array or instance of Headers' ) ; } return $ headers ; }
docstring: Normalize provided headers and ensure that the result object is Headers.
  
  @param Headers|array $headers The request body object
  
  @return Headers Normalized headers
  
  @throws \InvalidArgumentException If an unsupported argument type is provided.
docstring_tokens: Normalize provided headers and ensure that the result object is Headers .