code: def get_object_id_from_graph(access_token=None):
      '''Return the object ID for the Graph user who owns the access token.
  
      Args:
          access_token (str): A Microsoft Graph access token. (Not an Azure access token.)
                              If not provided, attempt to get it from MSI_ENDPOINT.
  
      Returns:
          An object ID string for a user or service principal.
      '''
      if access_token is None:
          access_token = get_graph_token_from_msi()
  
      endpoint = 'https://' + GRAPH_RESOURCE_HOST + '/v1.0/me/'
      headers = {'Authorization': 'Bearer ' + access_token, 'Host': GRAPH_RESOURCE_HOST}
      ret = requests.get(endpoint, headers=headers)
      return ret.json()['id'f get_object_id_from_graph(access_token=None):
      '''Return the object ID for the Graph user who owns the access token.
  
      Args:
          access_token (str): A Microsoft Graph access token. (Not an Azure access token.)
                              If not provided, attempt to get it from MSI_ENDPOINT.
  
      Returns:
          An object ID string for a user or service principal.
      '''
      if access_token is None:
          access_token = get_graph_token_from_msi()
  
      endpoint = 'https://' + GRAPH_RESOURCE_HOST + '/v1.0/me/'
      headers = {'Authorization': 'Bearer ' + access_token, 'Host': GRAPH_RESOURCE_HOST}
      ret = requests.get(endpoint, headers=headers)
      return ret.json()['id']
docs: Return the object ID for the Graph user who owns the access token.
  
      Args:
          access_token (str): A Microsoft Graph access token. (Not an Azure access token.)
                              If not provided, attempt to get it from MSI_ENDPOINT.
  
      Returns:
          An object ID string for a user or service principal.