def extract_job_specs(replica_specs):
  """Extract tf job specs from tfReplicaSpecs.

  Args:
    replica_specs: A dictionary having information of tfReplicaSpecs from manifest.
    returns: Dictionary. Key is tf job type and value is number of replicas.
  """
  specs = dict()
  for job_type in replica_specs:
    specs[job_type.encode("ascii").lower()] = int(
      replica_specs.get(job_type, {}).get("replicas", 0))
  return specs