  def FormOperation(
      self,
      operation_name: str) -> 'googleapiclient.discovery.Resource':
    """Form an API operation object for the compute resource.

    Example:[RESOURCE].FormOperation('setLabels')(**kwargs)
    [RESOURCE] can be type "instance", disk or "Snapshot".

    Args:
      operation_name (str): The name of the API operation you need to perform.

    Returns:
      googleapiclient.discovery.Resource: An API operation object for the
          referenced compute resource.

    Raises:
      RuntimeError: If resource type is not defined as a type which
          extends the GoogleComputeBaseResource class.
    """

    resource_type = self.GetResourceType()
    module = None
    if resource_type not in ['compute#instance',
                             'compute#Snapshot',
                             'compute#disk']:
      error_msg = (
          'Compute resource Type {0:s} is not one of the defined '
          'types in libcloudforensics library '
          '(Instance, Disk or Snapshot).').format(resource_type)
      raise RuntimeError(error_msg)
    if resource_type == 'compute#instance':
      module = self.GceApi().instances() # pylint: disable=no-member
    elif resource_type == 'compute#disk':
      module = self.GceApi().disks() # pylint: disable=no-member
    elif resource_type == 'compute#Snapshot':
      module = self.GceApi().snapshots() # pylint: disable=no-member

    operation_func_to_call = getattr(module, operation_name)
    return operation_func_to_call
Form an API operation object for the compute resource.

Example:[RESOURCE].FormOperation('setLabels')(**kwargs)
[RESOURCE] can be type "instance", disk or "Snapshot".

Args:
operation_name (str): The name of the API operation you need to perform.

Returns:
googleapiclient.discovery.Resource: An API operation object for the
referenced compute resource.

Raises:
RuntimeError: If resource type is not defined as a type which
extends the GoogleComputeBaseResource class.
libcloudforensics/providers/gcp/internal/compute_base_resource.py