I created this class method to prevent code duplication between dynamically created `set_inherited_sequence` and `set_sequence` methods.