@classmethod
def _from_object(cls, policy):
    """Construct a policy from a Policy object.

        @param cls: The target class.
        @param policy: A policy object.
        """
    kwargs = {'id': policy.id, 'type': policy.type, 'user': policy.user,
        'project': policy.project, 'domain': policy.domain, 'created_at':
        policy.created_at, 'updated_at': policy.updated_at, 'data': policy.data
        }
    return cls(policy.name, policy.spec, **kwargs)
