  def ClientApi(self,
                service: str,
                region: Optional[str] = None) -> 'botocore.client.EC2':  # pylint: disable=no-member
    """Create an AWS client object.

    Args:
      service (str): The AWS service to use.
      region (str): Optional. The region in which to create new resources. If
          none provided, the default_region associated to the AWSAccount
          object will be used.
    Returns:
      botocore.client.EC2: An AWS EC2 client object.
    """

    if region:
      return self.session.client(service_name=service, region_name=region)
    return self.session.client(
        service_name=service, region_name=self.default_region)
Create an AWS client object.

Args:
service (str): The AWS service to use.
region (str): Optional. The region in which to create new resources. If
none provided, the default_region associated to the AWSAccount
object will be used.
Returns:
botocore.client.EC2: An AWS EC2 client object.
libcloudforensics/providers/aws/internal/account.py