<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_last_api_metadata(self):
 """Get meta data for the last Mbed Cloud API call. :returns: meta data of the last Mbed Cloud API call :rtype: ApiMetadata """

        last_metadata = None
        for key, api in iteritems(self.apis):
            api_client = api.api_client
            if api_client is not None:
                metadata = api_client.get_last_metadata()
                if metadata is not None and metadata.get('timestamp', None) is not None:
                    if last_metadata is None:
                        last_metadata = metadata
                    elif metadata["timestamp"] >= last_metadata["timestamp"]:
                        last_metadata = metadata
        if last_metadata is not None:
            last_metadata = ApiMetadata(last_metadata.get("url"),
                                        last_metadata.get("method"),
                                        last_metadata.get("response", None),
                                        last_metadata.get("return_data", None),
                                        last_metadata.get("exception", None))
        return last_metadata