This is the result:
<schema>
<search_type name="default/model" xpos="508" ypos="266"/>
<search_type name="default/music" xpos="927" ypos="417"/>
<search_type name="default/sound" xpos="528" ypos="405"/>
<search_type name="default/texture" xpos="932" ypos="274"/>
<search_type name="testovy/asset" xpos="494" ypos="110"/>
<search_type name="testovy/asset_in_asset" xpos="696" ypos="136"/>
<search_type name="testovy/episode" xpos="100" ypos="100"/>
<search_type name="testovy/episode_in_asset" xpos="297" ypos="105"/>
<search_type name="testovy/repo_sync_presets" xpos="1450" ypos="550"/>
<search_type name="testovy/sound_in_music" xpos="728" ypos="411"/>
<search_type name="testovy/texture_in_model" xpos="720" ypos="270"/>
<connect from="testovy/episode_in_asset" to="testovy/episode" relationship="code"/>
<connect from="testovy/episode_in_asset" to="testovy/asset" relationship="code"/>
<connect from="testovy/sound_in_music" to="default/sound" relationship="code"/>
<connect from="testovy/sound_in_music" to="default/music" relationship="code"/>
<connect from="testovy/texture_in_model" to="default/texture" relationship="code"/>
<connect from="testovy/texture_in_model" to="default/model" relationship="code"/>
<connect from="testovy/asset" to="testovy/asset" instance_type="testovy/asset_in_asset" relationship="instance"/>
<connect from="testovy/asset_in_asset" to="testovy/asset" relationship="code" from_col="parent_asset_code" to_col="code" path="parent" type="many_to_many"/>
<connect from="testovy/asset_in_asset" to="testovy/asset" relationship="code" from_col="child_asset_code" to_col="code" path="child" type="many_to_many"/>
</schema>
{}
To check print(schema.get_relationship_attrs("testovy/asset", "testovy/episode_in_asset")):
{'to': 'testovy/asset', 'from_col': u'asset_code', 'from': 'testovy/episode_in_asset', 'to_col': 'code', 'relationship': 'code'}
And print(schema.get_relationship_attrs("testovy/asset", "testovy/asset")):
{'from': 'testovy/asset', 'relationship': 'instance', 'instance_type': 'testovy/asset_in_asset', 'to': 'testovy/asset', 'from_col': 'code', 'to_col': 'code'}
<schema>
<search_type name="default/model" xpos="508" ypos="266"/>
<search_type name="default/music" xpos="927" ypos="417"/>
<search_type name="default/sound" xpos="528" ypos="405"/>
<search_type name="default/texture" xpos="932" ypos="274"/>
<search_type name="testovy/asset" xpos="494" ypos="110"/>
<search_type name="testovy/asset_in_asset" xpos="696" ypos="136"/>
<search_type name="testovy/episode" xpos="100" ypos="100"/>
<search_type name="testovy/episode_in_asset" xpos="297" ypos="105"/>
<search_type name="testovy/repo_sync_presets" xpos="1450" ypos="550"/>
<search_type name="testovy/sound_in_music" xpos="728" ypos="411"/>
<search_type name="testovy/texture_in_model" xpos="720" ypos="270"/>
<connect from="testovy/episode_in_asset" to="testovy/episode" relationship="code"/>
<connect from="testovy/episode_in_asset" to="testovy/asset" relationship="code"/>
<connect from="testovy/sound_in_music" to="default/sound" relationship="code"/>
<connect from="testovy/sound_in_music" to="default/music" relationship="code"/>
<connect from="testovy/texture_in_model" to="default/texture" relationship="code"/>
<connect from="testovy/texture_in_model" to="default/model" relationship="code"/>
<connect from="testovy/asset" to="testovy/asset" instance_type="testovy/asset_in_asset" relationship="instance"/>
<connect from="testovy/asset_in_asset" to="testovy/asset" relationship="code" from_col="parent_asset_code" to_col="code" path="parent" type="many_to_many"/>
<connect from="testovy/asset_in_asset" to="testovy/asset" relationship="code" from_col="child_asset_code" to_col="code" path="child" type="many_to_many"/>
</schema>
{}
To check print(schema.get_relationship_attrs("testovy/asset", "testovy/episode_in_asset")):
{'to': 'testovy/asset', 'from_col': u'asset_code', 'from': 'testovy/episode_in_asset', 'to_col': 'code', 'relationship': 'code'}
And print(schema.get_relationship_attrs("testovy/asset", "testovy/asset")):
{'from': 'testovy/asset', 'relationship': 'instance', 'instance_type': 'testovy/asset_in_asset', 'to': 'testovy/asset', 'from_col': 'code', 'to_col': 'code'}