def _id_from_response(self, response):
        """Pull the ID out of a response from a create POST.

        Args:
            response: A Response object.
        Returns:
           An id string.
        """
        match = re.search(r'\/([^\/]*?)(\.\w+)?$',
                          response.get('Location',
                                       response.get('location', '')))
        if match:
            try:
                return int(match.group(1))
            except __HOLE__:
                return match.group(1)
dataset/ETHPy150Open JetBrains/youtrack-rest-python-library/python/pyactiveresource/activeresource.py/ActiveResource._id_from_response