
lei_test = {"records":[{
    "LEI" : {
        "$" : "001GPB6A9XPE8XJICC14"
    },
    "Entity" : {
        "LegalName" : {
            "$" : "FIDELITY ADVISOR SERIES I - Fidelity Advisor Leveraged Company Stock Fund"
        },
        "OtherEntityNames" : {
            "OtherEntityName" : [ {
                "@type" : "PREVIOUS_LEGAL_NAME",
                "$" : "Jennison 20/20 Focus Fund"
            }, {
                "@type" : "PREVIOUS_LEGAL_NAME",
                "$" : "Prudential 20/20 Focus Fund"
            }, {
                "@type" : "PREVIOUS_LEGAL_NAME",
                "$" : "Prudential 20/20 Fund"
            }, {
                "@type" : "PREVIOUS_LEGAL_NAME",
                "$" : "Prudential Jennison 20/20 Focus Fund"
            } ]
        },
        "LegalAddress" : {
            "FirstAddressLine" : {
                "$" : "245 Summer Street"
            },
            "City" : {
                "$" : "Boston"
            },
            "Region" : {
                "$" : "US-MA"
            },
            "Country" : {
                "$" : "US"
            },
            "PostalCode" : {
                "$" : "02110"
            }
        },
        "HeadquartersAddress" : {
            "FirstAddressLine" : {
                "$" : "245 Summer Street"
            },
            "City" : {
                "$" : "Boston"
            },
            "Region" : {
                "$" : "US-MA"
            },
            "Country" : {
                "$" : "US"
            },
            "PostalCode" : {
                "$" : "02210"
            }
        },
        "OtherAddresses" : {
            "OtherAddress" : [ {
                "@type" : "ALTERNATIVE_LANGUAGE_HEADQUARTERS_ADDRESS",
                "@xml:lang" : "fr",
                "FirstAddressLine" : {
                    "$" : "27 GERRARD ROAD"
                },
                "AdditionalAddressLine" : {
                    "$" : "IKOYI"
                },
                "City" : {
                    "$" : "LAGOS"
                },
                "Region" : {
                    "$" : "NG-LA"
                },
                "Country" : {
                    "$" : "NG"
                },
                "PostalCode" : {
                    "$" : "23401"
                }
            } ]
        },
        "RegistrationAuthority" : {
            "RegistrationAuthorityID" : {
                "$" : "RA000665"
            },
            "RegistrationAuthorityEntityID" : {
                "$" : "S000005113"
            }
        },
        "LegalJurisdiction" : {
            "$" : "US"
        },
        "EntityCategory" : {
            "$" : "FUND"
        },
        "LegalForm" : {
            "EntityLegalFormCode" : {
                "$" : "9999"
            },
            "OtherLegalForm" : {
                "$" : "OTHER"
            }
        },
        "EntityStatus" : {
            "$" : "ACTIVE"
        }
    },
    "Registration" : {
        "InitialRegistrationDate" : {
            "$" : "2012-11-29T16:33:00.000Z"
        },
        "LastUpdateDate" : {
            "$" : "2019-06-18T14:32:00.000Z"
        },
        "RegistrationStatus" : {
            "$" : "ISSUED"
        },
        "NextRenewalDate" : {
            "$" : "2020-06-14T10:17:00.000Z"
        },
        "ManagingLOU" : {
            "$" : "EVK05KS7XY1DEII3R011"
        },
        "ValidationSources" : {
            "$" : "FULLY_CORROBORATED"
        }
    },
    "Extension" : {
        "gleif:Geocoding" : [ {
            "gleif:original_address" : {
                "$" : "245 Summer Street, 02210, Boston, US-MA, US"
            },
            "gleif:relevance" : {
                "$" : "0.92"
            },
            "gleif:match_type" : {
                "$" : "pointAddress"
            },
            "gleif:lat" : {
                "$" : "42.3514"
            },
            "gleif:lng" : {
                "$" : "-71.05385"
            },
            "gleif:geocoding_date" : {
                "$" : "2017-10-23T19:14:11"
            },
            "gleif:bounding_box" : {
                "$" : "TopLeft.Latitude: 42.3525242, TopLeft.Longitude: -71.0553711, BottomRight.Latitude: 42.3502758, BottomRight.Longitude: -71.0523289"
            },
            "gleif:match_level" : {
                "$" : "houseNumber"
            },
            "gleif:formatted_address" : {
                "$" : "245 Summer St, Boston, MA 02210, United States"
            },
            "gleif:mapped_location_id" : {
                "$" : "NT_PYMT6GOD3rrAC9q2Al5jZB_yQTN"
            },
            "gleif:mapped_street" : {
                "$" : "Summer St"
            },
            "gleif:mapped_housenumber" : {
                "$" : "245"
            },
            "gleif:mapped_postalcode" : {
                "$" : "02210"
            },
            "gleif:mapped_city" : {
                "$" : "Boston"
            },
            "gleif:mapped_district" : {
                "$" : "Downtown Boston"
            },
            "gleif:mapped_state" : {
                "$" : "MA"
            },
            "gleif:mapped_country" : {
                "$" : "USA"
            }
        }, {
            "gleif:original_address" : {
                "$" : "245 Summer Street, 02110, Boston, US-MA, US"
            },
            "gleif:relevance" : {
                "$" : "0.89"
            },
            "gleif:match_type" : {
                "$" : "pointAddress"
            },
            "gleif:lat" : {
                "$" : "42.3514"
            },
            "gleif:lng" : {
                "$" : "-71.05385"
            },
            "gleif:geocoding_date" : {
                "$" : "2017-10-23T18:42:07"
            },
            "gleif:bounding_box" : {
                "$" : "TopLeft.Latitude: 42.3525242, TopLeft.Longitude: -71.0553711, BottomRight.Latitude: 42.3502758, BottomRight.Longitude: -71.0523289"
            },
            "gleif:match_level" : {
                "$" : "houseNumber"
            },
            "gleif:formatted_address" : {
                "$" : "245 Summer St, Boston, MA 02210, United States"
            },
            "gleif:mapped_location_id" : {
                "$" : "NT_PYMT6GOD3rrAC9q2Al5jZB_yQTN"
            },
            "gleif:mapped_street" : {
                "$" : "Summer St"
            },
            "gleif:mapped_housenumber" : {
                "$" : "245"
            },
            "gleif:mapped_postalcode" : {
                "$" : "02210"
            },
            "gleif:mapped_city" : {
                "$" : "Boston"
            },
            "gleif:mapped_district" : {
                "$" : "Downtown Boston"
            },
            "gleif:mapped_state" : {
                "$" : "MA"
            },
            "gleif:mapped_country" : {
                "$" : "USA"
            }
        }]
    }
}]}

rr_test = {"relations":[{
"RelationshipRecord" :{
    "Relationship" : {
        "StartNode" : {
            "NodeID" : {
                "$" : "001GPB6A9XPE8XJICC14"
            },
            "NodeIDType" : {
                "$" : "LEI"
            }
        },
        "EndNode" : {
            "NodeID" : {
                "$" : "C7J4FOV6ELAVE39B7M82"
            },
            "NodeIDType" : {
                "$" : "LEI"
            }
        },
        "RelationshipType" : {
            "$" : "IS_DIRECTLY_CONSOLIDATED_BY"
        },
        "RelationshipPeriods" : {
            "RelationshipPeriod" : [ {
                "StartDate" : {
                    "$" : "2017-01-01T00:00:00.000Z"
                },
                "EndDate" : {
                    "$" : "2017-12-31T00:00:00.000Z"
                },
                "PeriodType" : {
                    "$" : "ACCOUNTING_PERIOD"
                }
            }, {
                "StartDate" : {
                    "$" : "2018-06-15T00:00:00.000Z"
                },
                "PeriodType" : {
                    "$" : "RELATIONSHIP_PERIOD"
                }
            } ]
        },
        "RelationshipStatus" : {
            "$" : "ACTIVE"
        },
        "RelationshipQualifiers" : {
            "RelationshipQualifier" : {
                "QualifierDimension" : {
                    "$" : "ACCOUNTING_STANDARD"
                }
            }
        }
    },
    "Registration": {
        "InitialRegistrationDate": {
            "$": "2012-10-10T12:35:00.000Z"
        },
        "LastUpdateDate": {
            "$": "2018-04-12T21:12:00.000Z"
        },
        "RegistrationStatus": {
            "$": "PUBLISHED"
        },
        "NextRenewalDate": {
            "$": "2019-02-08T00:31:00.000Z"
        },
        "ManagingLOU": {
            "$": "EVK05KS7XY1DEII3R011"
        },
        "ValidationSources": {
            "$": "FULLY_CORROBORATED"
        },
        "ValidationDocuments": {
            "$": "ACCOUNTS_FILING"
        },
        "ValidationReference": {
            "$": "https://www.bafin.de/SharedDocs/Downloads/DE/Angebotsunterlage/SLM_Solutions.pdf?__blob=publicationFile&v=1"
        }
    }
}}]}

lei_test = {"records":[{
    "LEI" : {
        "$" : "001GPB6A9XPE8XJICC14"
    },
    "Entity" : {
        "LegalName" : {
            "$" : "FIDELITY ADVISOR SERIES I - Fidelity Advisor Leveraged Company Stock Fund"
        },
        "OtherEntityNames" : {
            "OtherEntityName" : [ {
                "@type" : "PREVIOUS_LEGAL_NAME",
                "$" : "Jennison 20/20 Focus Fund"
            }, {
                "@type" : "PREVIOUS_LEGAL_NAME",
                "$" : "Prudential 20/20 Focus Fund"
            }, {
                "@type" : "PREVIOUS_LEGAL_NAME",
                "$" : "Prudential 20/20 Fund"
            }, {
                "@type" : "PREVIOUS_LEGAL_NAME",
                "$" : "Prudential Jennison 20/20 Focus Fund"
            } ]
        },
        "LegalAddress" : {
            "FirstAddressLine" : {
                "$" : "245 Summer Street"
            },
            "City" : {
                "$" : "Boston"
            },
            "Region" : {
                "$" : "US-MA"
            },
            "Country" : {
                "$" : "US"
            },
            "PostalCode" : {
                "$" : "02110"
            }
        },
        "HeadquartersAddress" : {
            "FirstAddressLine" : {
                "$" : "245 Summer Street"
            },
            "City" : {
                "$" : "Boston"
            },
            "Region" : {
                "$" : "US-MA"
            },
            "Country" : {
                "$" : "US"
            },
            "PostalCode" : {
                "$" : "02210"
            }
        },
        "OtherAddresses" : {
            "OtherAddress" : [ {
                "@type" : "ALTERNATIVE_LANGUAGE_HEADQUARTERS_ADDRESS",
                "@xml:lang" : "fr",
                "FirstAddressLine" : {
                    "$" : "27 GERRARD ROAD"
                },
                "AdditionalAddressLine" : {
                    "$" : "IKOYI"
                },
                "City" : {
                    "$" : "LAGOS"
                },
                "Region" : {
                    "$" : "NG-LA"
                },
                "Country" : {
                    "$" : "NG"
                },
                "PostalCode" : {
                    "$" : "23401"
                }
            } ]
        },
        "RegistrationAuthority" : {
            "RegistrationAuthorityID" : {
                "$" : "RA000665"
            },
            "RegistrationAuthorityEntityID" : {
                "$" : "S000005113"
            }
        },
        "LegalJurisdiction" : {
            "$" : "US"
        },
        "EntityCategory" : {
            "$" : "FUND"
        },
        "LegalForm" : {
            "EntityLegalFormCode" : {
                "$" : "9999"
            },
            "OtherLegalForm" : {
                "$" : "OTHER"
            }
        },
        "EntityStatus" : {
            "$" : "ACTIVE"
        }
    },
    "Registration" : {
        "InitialRegistrationDate" : {
            "$" : "2012-11-29T16:33:00.000Z"
        },
        "LastUpdateDate" : {
            "$" : "2019-06-18T14:32:00.000Z"
        },
        "RegistrationStatus" : {
            "$" : "ISSUED"
        },
        "NextRenewalDate" : {
            "$" : "2020-06-14T10:17:00.000Z"
        },
        "ManagingLOU" : {
            "$" : "EVK05KS7XY1DEII3R011"
        },
        "ValidationSources" : {
            "$" : "FULLY_CORROBORATED"
        }
    },
    "Extension" : {
        "gleif:Geocoding" : [ {
            "gleif:original_address" : {
                "$" : "245 Summer Street, 02210, Boston, US-MA, US"
            },
            "gleif:relevance" : {
                "$" : "0.92"
            },
            "gleif:match_type" : {
                "$" : "pointAddress"
            },
            "gleif:lat" : {
                "$" : "42.3514"
            },
            "gleif:lng" : {
                "$" : "-71.05385"
            },
            "gleif:geocoding_date" : {
                "$" : "2017-10-23T19:14:11"
            },
            "gleif:bounding_box" : {
                "$" : "TopLeft.Latitude: 42.3525242, TopLeft.Longitude: -71.0553711, BottomRight.Latitude: 42.3502758, BottomRight.Longitude: -71.0523289"
            },
            "gleif:match_level" : {
                "$" : "houseNumber"
            },
            "gleif:formatted_address" : {
                "$" : "245 Summer St, Boston, MA 02210, United States"
            },
            "gleif:mapped_location_id" : {
                "$" : "NT_PYMT6GOD3rrAC9q2Al5jZB_yQTN"
            },
            "gleif:mapped_street" : {
                "$" : "Summer St"
            },
            "gleif:mapped_housenumber" : {
                "$" : "245"
            },
            "gleif:mapped_postalcode" : {
                "$" : "02210"
            },
            "gleif:mapped_city" : {
                "$" : "Boston"
            },
            "gleif:mapped_district" : {
                "$" : "Downtown Boston"
            },
            "gleif:mapped_state" : {
                "$" : "MA"
            },
            "gleif:mapped_country" : {
                "$" : "USA"
            }
        }, {
            "gleif:original_address" : {
                "$" : "245 Summer Street, 02110, Boston, US-MA, US"
            },
            "gleif:relevance" : {
                "$" : "0.89"
            },
            "gleif:match_type" : {
                "$" : "pointAddress"
            },
            "gleif:lat" : {
                "$" : "42.3514"
            },
            "gleif:lng" : {
                "$" : "-71.05385"
            },
            "gleif:geocoding_date" : {
                "$" : "2017-10-23T18:42:07"
            },
            "gleif:bounding_box" : {
                "$" : "TopLeft.Latitude: 42.3525242, TopLeft.Longitude: -71.0553711, BottomRight.Latitude: 42.3502758, BottomRight.Longitude: -71.0523289"
            },
            "gleif:match_level" : {
                "$" : "houseNumber"
            },
            "gleif:formatted_address" : {
                "$" : "245 Summer St, Boston, MA 02210, United States"
            },
            "gleif:mapped_location_id" : {
                "$" : "NT_PYMT6GOD3rrAC9q2Al5jZB_yQTN"
            },
            "gleif:mapped_street" : {
                "$" : "Summer St"
            },
            "gleif:mapped_housenumber" : {
                "$" : "245"
            },
            "gleif:mapped_postalcode" : {
                "$" : "02210"
            },
            "gleif:mapped_city" : {
                "$" : "Boston"
            },
            "gleif:mapped_district" : {
                "$" : "Downtown Boston"
            },
            "gleif:mapped_state" : {
                "$" : "MA"
            },
            "gleif:mapped_country" : {
                "$" : "USA"
            }
        }]
    }
}]}

rr_test = {"relations":[{
"RelationshipRecord" :{
    "Relationship" : {
        "StartNode" : {
            "NodeID" : {
                "$" : "001GPB6A9XPE8XJICC14"
            },
            "NodeIDType" : {
                "$" : "LEI"
            }
        },
        "EndNode" : {
            "NodeID" : {
                "$" : "C7J4FOV6ELAVE39B7M82"
            },
            "NodeIDType" : {
                "$" : "LEI"
            }
        },
        "RelationshipType" : {
            "$" : "IS_DIRECTLY_CONSOLIDATED_BY"
        },
        "RelationshipPeriods" : {
            "RelationshipPeriod" : [ {
                "StartDate" : {
                    "$" : "2017-01-01T00:00:00.000Z"
                },
                "EndDate" : {
                    "$" : "2017-12-31T00:00:00.000Z"
                },
                "PeriodType" : {
                    "$" : "ACCOUNTING_PERIOD"
                }
            }, {
                "StartDate" : {
                    "$" : "2018-06-15T00:00:00.000Z"
                },
                "PeriodType" : {
                    "$" : "RELATIONSHIP_PERIOD"
                }
            } ]
        },
        "RelationshipStatus" : {
            "$" : "ACTIVE"
        },
        "RelationshipQualifiers" : {
            "RelationshipQualifier" : {
                "QualifierDimension" : {
                    "$" : "ACCOUNTING_STANDARD"
                }
            }
        }
    },
    "Registration": {
        "InitialRegistrationDate": {
            "$": "2012-10-10T12:35:00.000Z"
        },
        "LastUpdateDate": {
            "$": "2018-04-12T21:12:00.000Z"
        },
        "RegistrationStatus": {
            "$": "PUBLISHED"
        },
        "NextRenewalDate": {
            "$": "2019-02-08T00:31:00.000Z"
        },
        "ManagingLOU": {
            "$": "EVK05KS7XY1DEII3R011"
        },
        "ValidationSources": {
            "$": "FULLY_CORROBORATED"
        },
        "ValidationDocuments": {
            "$": "ACCOUNTS_FILING"
        },
        "ValidationReference": {
            "$": "https://www.bafin.de/SharedDocs/Downloads/DE/Angebotsunterlage/SLM_Solutions.pdf?__blob=publicationFile&v=1"
        }
    }
}}]}