code: def get_cloud_from_metadata_endpoint(arm_endpoint, name=None, session=None):
      
      cloud = Cloud(name or arm_endpoint)
      cloud.endpoints.management = arm_endpoint
      cloud.endpoints.resource_manager = arm_endpoint
      _populate_from_metadata_endpoint(cloud, arm_endpoint, session)
      return cloud
docs: Get a Cloud object from an ARM endpoint.
  
      .. versionadded:: 0.4.11
  
      :Example:
  
      .. code:: python
  
          get_cloud_from_metadata_endpoint(https://management.azure.com/, "Public Azure")
  
      :param str arm_endpoint: The ARM management endpoint
      :param str name: An optional name for the Cloud object. Otherwise it's the ARM endpoint
      :params requests.Session session: A requests session object if you need to configure proxy, cert, etc.
      :rtype Cloud:
      :returns: a Cloud object
      :raises: MetadataEndpointError if unable to build the Cloud object