def METHOD_NAME(
    self,
    registry_client: MLClient,
    code_asset_path: str,
    randstr: Callable[[str], str],
) -> None:
    name = randstr("name")
    code_entity = Code(name=name, version="2", path=code_asset_path)
    assert str(code_entity.path) == str(Path(code_asset_path))
    code_asset_1 = registry_client._code.create_or_update(code_entity)
    code_asset_2 = registry_client._code.get(code_asset_1.name, code_asset_1.version)
    assert code_asset_1.id == code_asset_2.id