code: protected function prepareProductMediaGalleryValueToEntityAttributes()
      {
  
          // initialize and return the entity
          return $this->initializeEntity(
              array(
                  MemberNames::VALUE_ID  => $this->valueId,
                  MemberNames::ROW_ID    => $this->parentId
              )
          );
      }
docs: Prepare the product media gallery value to entity that has to be persisted.
  
  @return array The prepared product media gallery value to entity attributes