def METHOD_NAME(self):
    # Look for a panels definition in the InlinePanel declaration
    if self.panels is not None:
        return self.panels
    # Failing that, get it from the model
    return extract_panel_definitions_from_model_class(
        self.db_field.related_model, exclude=[self.db_field.field.name]
    )