def METHOD_NAME(
    self, photon_series_type: Literal["OnePhotonSeries", "TwoPhotonSeries"] = "TwoPhotonSeries"
) -> dict:
    metadata_schema = super().METHOD_NAME()
    metadata_schema["required"] = ["Ophys"]
    # Initiate Ophys metadata
    metadata_schema["properties"]["Ophys"] = get_base_schema(tag="Ophys")
    metadata_schema["properties"]["Ophys"]["required"] = ["Device", "ImagingPlane", photon_series_type]
    metadata_schema["properties"]["Ophys"]["properties"] = dict(
        Device=dict(type="array", minItems=1, items={"$ref": "#/properties/Ophys/properties/definitions/Device"}),
        ImagingPlane=dict(
            type="array", minItems=1, items={"$ref": "#/properties/Ophys/properties/definitions/ImagingPlane"}
        ),
    )
    metadata_schema["properties"]["Ophys"]["properties"].update(
        {
            photon_series_type: dict(
                type="array",
                minItems=1,
                items={"$ref": f"#/properties/Ophys/properties/definitions/{photon_series_type}"},
            ),
        }
    )
    # Schema definition for arrays
    imaging_plane_schema = get_schema_from_hdmf_class(ImagingPlane)
    imaging_plane_schema["properties"]["optical_channel"].pop("maxItems")
    metadata_schema["properties"]["Ophys"]["properties"]["definitions"] = dict(
        Device=get_schema_from_hdmf_class(Device),
        ImagingPlane=imaging_plane_schema,
    )
    photon_series = dict(
        OnePhotonSeries=OnePhotonSeries,
        TwoPhotonSeries=TwoPhotonSeries,
    )[photon_series_type]
    metadata_schema["properties"]["Ophys"]["properties"]["definitions"].update(
        {
            photon_series_type: get_schema_from_hdmf_class(photon_series),
        }
    )
    fill_defaults(metadata_schema, self.get_metadata())
    return metadata_schema