You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: valkyrie_create_derivatives_job.rb
    path of file: ./repos/hyrax/app/jobs
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
class ValkyrieCreateDer
    
  def perform(file_set_id, file_id, _filepath = nil)
    file_metadata = Hyrax.custom_queries.find_file_metadata_by(id: file_id)
    return if file_metadata.video? && !Hyrax.config.enable_ffmpeg
    # Get file into a local path.
    file = Hyrax.storage_adapter.find_by(id: file_metadata.file_identifier)
    # Call derivatives with the file_set.
    derivative_service = Hyrax::DerivativeService.for(file_metadata)
    derivative_service.create_derivatives(file.disk_path)
    reindex_parent(file_set_id)
  end