code: public function createMessage(array $data = [])
      {
          /** @var Message $className */
          $className = $this->className;
          if (empty($data)) {
              return $className::create();
          }
  
          return $className::fromArray($data);
      }
docs: Convenience method that creates a message instance with this schema.
  
  @param array $data
  
  @return Message