The relationship between lexemes and forms/senses, e.g. the fact the data of the form is stored in the page related to the lexeme the form belongs to has been codified using the sub-entity-type setting in entity type definitions, see https://github.com/wikimedia/mediawiki-extensions-WikibaseLexeme/blob/master/WikibaseLexeme.entitytypes.php#L80-L83
EntitySourceDefinitions has to make use of this definitions in order to, for example, be able to provide the entity source which provides entities of type form.