<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_containers(self, services=None, states=None):
 """Get information on containers in this application. Parameters services : sequence of str, optional If provided, containers will be filtered to these services. Default is all services. states : sequence of ContainerState, optional If provided, containers will be filtered by these container states. Default is ``['WAITING', 'REQUESTED', 'RUNNING']``. Returns ------- containers : list of Container """

        if services is not None:
            services = set(services)
        if states is not None:
            states = [str(ContainerState(s)) for s in states]

        req = proto.ContainersRequest(services=services, states=states)
        resp = self._call('getContainers', req)
        return sorted((Container.from_protobuf(c) for c in resp.containers),
                      key=lambda x: (x.service_name, x.instance))